From: Kent Overstreet Date: Sun, 29 Mar 2020 18:21:44 +0000 (-0400) Subject: bcachefs: Switch a BUG_ON() to a warning X-Git-Tag: io_uring-6.7-2023-11-10~119^2~2128 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b72633aed07b0b870680a4de0d40fc79d2edfd03;p=linux-2.6-block.git bcachefs: Switch a BUG_ON() to a warning This has popped and thus needs to be debugged, but the assertion firing isn't necessarily fatal so switch it to a warning. Signed-off-by: Kent Overstreet Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 26a8ff38991d..220daf88f7b9 100644 --- a/fs/bcachefs/journal.c +++ b/fs/bcachefs/journal.c @@ -375,7 +375,8 @@ unlock: goto retry; if (ret == -ENOSPC) { - BUG_ON(!can_discard && (flags & JOURNAL_RES_GET_RESERVED)); + WARN_ONCE(!can_discard && (flags & JOURNAL_RES_GET_RESERVED), + "JOURNAL_RES_GET_RESERVED set but journal full"); /* * Journal is full - can't rely on reclaim from work item due to