Skip to content

Commit 8ce1db8

Browse files
author
Kent Overstreet
committed
bcachefs: Fix remove_dirent()
We were missing an iter_traverse(). Signed-off-by: Kent Overstreet <[email protected]>
1 parent cecfed9 commit 8ce1db8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

fs/bcachefs/fsck.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,10 @@ static int __remove_dirent(struct btree_trans *trans, struct bpos pos)
158158

159159
bch2_trans_iter_init(trans, &iter, BTREE_ID_dirents, pos, BTREE_ITER_INTENT);
160160

161-
ret = bch2_hash_delete_at(trans, bch2_dirent_hash_desc,
162-
&dir_hash_info, &iter,
163-
BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE);
161+
ret = bch2_btree_iter_traverse(&iter) ?:
162+
bch2_hash_delete_at(trans, bch2_dirent_hash_desc,
163+
&dir_hash_info, &iter,
164+
BTREE_UPDATE_INTERNAL_SNAPSHOT_NODE);
164165
bch2_trans_iter_exit(trans, &iter);
165166
err:
166167
bch_err_fn(c, ret);

0 commit comments

Comments
 (0)