Revision | b4f210563e63e5d4b73e3232fd7156424533063e (tree) |
---|---|
Time | 2022-07-20 12:49:57 |
Author | Pali Rohár <pali@kern...> |
Commiter | Heiko Schocher |
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>
@@ -173,13 +173,7 @@ struct ubifs_global_debug_info { | ||
173 | 173 | } \ |
174 | 174 | } while (0) |
175 | 175 | |
176 | -#define ubifs_assert_cmt_locked(c) do { \ | |
177 | - if (unlikely(down_write_trylock(&(c)->commit_sem))) { \ | |
178 | - up_write(&(c)->commit_sem); \ | |
179 | - pr_debug("commit lock is not locked!\n"); \ | |
180 | - ubifs_assert(0); \ | |
181 | - } \ | |
182 | -} while (0) | |
176 | +#define ubifs_assert_cmt_locked(c) do { } while (0) | |
183 | 177 | |
184 | 178 | #define ubifs_dbg_msg(type, fmt, ...) \ |
185 | 179 | pr_debug("UBIFS DBG " type ": " fmt "\n", \ |