summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-03-16 14:24:29 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-17 20:53:11 -0400
commit3ff3475611d5861ebae62e651608b7ccdb054736 (patch)
treebea9ce8dd01a6ba06ef30399e156850f1a7f5a33 /fs
parent62f35024b2b1a301cd263230d8c060cce2010efe (diff)
bcachefs: Fix check_key_has_snapshot() call
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs')
-rw-r--r--fs/bcachefs/fsck.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/bcachefs/fsck.c b/fs/bcachefs/fsck.c
index f48033be3f6b..7228b118aad9 100644
--- a/fs/bcachefs/fsck.c
+++ b/fs/bcachefs/fsck.c
@@ -2022,8 +2022,10 @@ static int check_xattr(struct btree_trans *trans, struct btree_iter *iter,
int ret;
ret = check_key_has_snapshot(trans, iter, k);
- if (ret)
+ if (ret < 0)
return ret;
+ if (ret)
+ return 0;
i = walk_inode(trans, inode, k);
ret = PTR_ERR_OR_ZERO(i);