bcachefs: Switch a BUG_ON() to a warning
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 29 Mar 2020 18:21:44 +0000 (14:21 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:37 +0000 (17:08 -0400)
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 <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal.c

index 26a8ff38991dd98fdefb27e7d9ae69f3a93f8689..220daf88f7b9b68d3c345cb736f1323961b430bf 100644 (file)
@@ -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