From eeb15e0a785e7209ccef5e029374f87946ea7995 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Sun, 10 Jul 2022 13:38:06 +0200 Subject: [PATCH] ubifs: Fix ubifs_assert_cmt_locked() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- fs/ubifs/debug.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 5f6e12702d..d69f1e6ac7 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h @@ -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", \ -- 2.39.5