Commit e296b1f9 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix inode_backpointer_exists()

If the dirent an inode points to doesn't exist, we shouldn't be
returning an error - just 0/false.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent 0b090326
...@@ -1092,7 +1092,7 @@ static int inode_backpointer_exists(struct btree_trans *trans, ...@@ -1092,7 +1092,7 @@ static int inode_backpointer_exists(struct btree_trans *trans,
SPOS(inode->bi_dir, inode->bi_dir_offset, snapshot)); SPOS(inode->bi_dir, inode->bi_dir_offset, snapshot));
ret = bkey_err(d.s_c); ret = bkey_err(d.s_c);
if (ret) if (ret)
return ret; return ret == -ENOENT ? 0 : ret;
ret = dirent_points_to_inode(d, inode); ret = dirent_points_to_inode(d, inode);
bch2_trans_iter_exit(trans, &iter); bch2_trans_iter_exit(trans, &iter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment