From: Kent Overstreet Date: Sat, 19 Oct 2024 21:23:10 +0000 (-0400) Subject: bcachefs: Fix __bch2_fsck_err() warning X-Git-Tag: microblaze-v6.16~793^2~15 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=eb5db64c4570948e6ee0b0f53d658e136e06cd04;p=linux-2.6-microblaze.git 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 --- diff --git a/fs/bcachefs/error.c b/fs/bcachefs/error.c index 7a79f695ba2e..b679def8fb98 100644 --- a/fs/bcachefs/error.c +++ b/fs/bcachefs/error.c @@ -251,7 +251,10 @@ int __bch2_fsck_err(struct bch_fs *c, * delete the key) * - and we don't need to warn if we're not prompting */ - WARN_ON(!(flags & FSCK_AUTOFIX) && !trans && bch2_current_has_btree_trans(c)); + WARN_ON((flags & FSCK_CAN_FIX) && + !(flags & FSCK_AUTOFIX) && + !trans && + bch2_current_has_btree_trans(c)); if ((flags & FSCK_CAN_FIX) && test_bit(err, c->sb.errors_silent))