Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 54169ddd382d ("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>

authored by

Richard Weinberger and committed by
Greg Kroah-Hartman
f8ccb14f 79fc170b

+2 -2
+2 -2
fs/ubifs/super.c
··· 2337 2337 2338 2338 static void __exit ubifs_exit(void) 2339 2339 { 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); 2342 2342 2343 2343 dbg_debugfs_exit(); 2344 2344 ubifs_compressors_exit();