Skip to content

Commit

Permalink
ubifs: Fix WARN_ON logic in exit path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Weinberger authored and Greg Kroah-Hartman committed Oct 13, 2018
1 parent 79fc170 commit f8ccb14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ubifs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f8ccb14

Please sign in to comment.