Skip to content

Commit eb5db64

Browse files
author
Kent Overstreet
committed
bcachefs: Fix __bch2_fsck_err() warning
We only warn about having a btree_trans that wasn't passed in if we'll be prompting. Signed-off-by: Kent Overstreet <[email protected]>
1 parent bc6d2d1 commit eb5db64

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

fs/bcachefs/error.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,10 @@ int __bch2_fsck_err(struct bch_fs *c,
251251
* delete the key)
252252
* - and we don't need to warn if we're not prompting
253253
*/
254-
WARN_ON(!(flags & FSCK_AUTOFIX) && !trans && bch2_current_has_btree_trans(c));
254+
WARN_ON((flags & FSCK_CAN_FIX) &&
255+
!(flags & FSCK_AUTOFIX) &&
256+
!trans &&
257+
bch2_current_has_btree_trans(c));
255258

256259
if ((flags & FSCK_CAN_FIX) &&
257260
test_bit(err, c->sb.errors_silent))

0 commit comments

Comments
 (0)