All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ubifs: Fix WARN_ON logic in exit path
@ 2018-10-13  8:18 Richard Weinberger
  2018-10-13  9:33 ` Greg KH
  2018-10-13 16:21 ` Randy Dunlap
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Weinberger @ 2018-10-13  8:18 UTC (permalink / raw)
  To: gregkh; +Cc: linux-mtd, linux-kernel, dunlap, Richard Weinberger

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>
---
Greg,

can you please take this patch directly?
It fixes a brown paper bug which was introduced in rc1, I'd like to avoid
having it in a release and going the -stable path.

Thanks,
//richard
---
 fs/ubifs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index bf000c8aeffb..fec62e9dfbe6 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();
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-13 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-13  8:18 [PATCH] ubifs: Fix WARN_ON logic in exit path Richard Weinberger
2018-10-13  9:33 ` Greg KH
2018-10-13 16:21 ` Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.