Skip to content

Commit f8ccb14

Browse files
richardweinbergergregkh
authored andcommitted
ubifs: Fix WARN_ON logic in exit path
ubifs_assert() is not WARN_ON(), so we have to invert the checks. Randy faced this warning with UBIFS being a module, since most users use UBIFS as builtin because UBIFS is the rootfs nobody noticed so far. :-( Including me. Reported-by: Randy Dunlap <rdunlap@infradead.org> Fixes: 54169dd ("ubifs: Turn two ubifs_assert() into a WARN_ON()") Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 79fc170 commit f8ccb14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ubifs/super.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,8 +2337,8 @@ late_initcall(ubifs_init);
23372337

23382338
static void __exit ubifs_exit(void)
23392339
{
2340-
WARN_ON(list_empty(&ubifs_infos));
2341-
WARN_ON(atomic_long_read(&ubifs_clean_zn_cnt) == 0);
2340+
WARN_ON(!list_empty(&ubifs_infos));
2341+
WARN_ON(atomic_long_read(&ubifs_clean_zn_cnt) != 0);
23422342

23432343
dbg_debugfs_exit();
23442344
ubifs_compressors_exit();

0 commit comments

Comments
 (0)