bcachefs: Fix check_key_has_snapshot() call

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-03-16 14:24:29 -04:00
parent 62f35024b2
commit 3ff3475611

View File

@ -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);