ubifs: Fix ubifs_assert_cmt_locked()

U-Boot does not implement down_write_trylock() and its stub always returns
true that lock was acquired. Therefore ubifs_assert_cmt_locked() assert
currently always fails.

Fix this issue by redefining ubifs_assert_cmt_locked() to just empty stub
as there is nothing to assert.

Signed-off-by: Pali Rohár <pali@kernel.org>
This commit is contained in:
Pali Rohár 2022-07-10 13:38:06 +02:00 committed by Heiko Schocher
parent fc97ff2695
commit b4f210563e

View File

@ -173,13 +173,7 @@ struct ubifs_global_debug_info {
} \
} while (0)
#define ubifs_assert_cmt_locked(c) do { \
if (unlikely(down_write_trylock(&(c)->commit_sem))) { \
up_write(&(c)->commit_sem); \
pr_debug("commit lock is not locked!\n"); \
ubifs_assert(0); \
} \
} while (0)
#define ubifs_assert_cmt_locked(c) do { } while (0)
#define ubifs_dbg_msg(type, fmt, ...) \
pr_debug("UBIFS DBG " type ": " fmt "\n", \