mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
bcachefs: Fix btree iter leak in __bch2_insert_snapshot_whiteouts()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2a89a3e968
commit
4437590d5f
|
|
@ -1327,7 +1327,7 @@ int __bch2_insert_snapshot_whiteouts(struct btree_trans *trans,
|
|||
struct bpos new_pos)
|
||||
{
|
||||
struct bch_fs *c = trans->c;
|
||||
struct btree_iter old_iter, new_iter;
|
||||
struct btree_iter old_iter, new_iter = { NULL };
|
||||
struct bkey_s_c old_k, new_k;
|
||||
snapshot_id_list s;
|
||||
struct bkey_i *update;
|
||||
|
|
@ -1377,6 +1377,7 @@ int __bch2_insert_snapshot_whiteouts(struct btree_trans *trans,
|
|||
if (ret)
|
||||
break;
|
||||
}
|
||||
bch2_trans_iter_exit(trans, &new_iter);
|
||||
bch2_trans_iter_exit(trans, &old_iter);
|
||||
darray_exit(&s);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user