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 <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2020-03-29 14:21:44 -04:00 committed by Kent Overstreet
parent 22f776985f
commit b72633aed0

View File

@ -375,7 +375,8 @@ static int __journal_res_get(struct journal *j, struct journal_res *res,
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