summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-10-20 00:23:10 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-10-20 23:50:14 +0300
commiteb5db64c4570948e6ee0b0f53d658e136e06cd04 (patch)
treea41038b627a5a662d6a02ff9ad02bd162d2d4702 /fs
parentbc6d2d10418e1bfdb95b16f5dd4cca42d5dec766 (diff)
downloadlinux-eb5db64c4570948e6ee0b0f53d658e136e06cd04.tar.xz
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 <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/error.c5
1 files changed, 4 insertions, 1 deletions
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))