From b72633aed07b0b870680a4de0d40fc79d2edfd03 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sun, 29 Mar 2020 14:21:44 -0400 Subject: [PATCH] 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 --- fs/bcachefs/journal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/bcachefs/journal.c b/fs/bcachefs/journal.c index 26a8ff38991dd..220daf88f7b9b 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 -- 2.30.2