From: Richard Weinberger Date: Sat, 13 Oct 2018 08:18:41 +0000 (+0200) Subject: ubifs: Fix WARN_ON logic in exit path X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f8ccb14fd6c9f58ef766062b7e3929c423580f09;p=linux.git 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 Fixes: 54169ddd382d ("ubifs: Turn two ubifs_assert() into a WARN_ON()") Signed-off-by: Richard Weinberger Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index bf000c8aeffbb..fec62e9dfbe6a 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -2337,8 +2337,8 @@ late_initcall(ubifs_init); static void __exit ubifs_exit(void) { - WARN_ON(list_empty(&ubifs_infos)); - WARN_ON(atomic_long_read(&ubifs_clean_zn_cnt) == 0); + WARN_ON(!list_empty(&ubifs_infos)); + WARN_ON(atomic_long_read(&ubifs_clean_zn_cnt) != 0); dbg_debugfs_exit(); ubifs_compressors_exit();