Skip to content

Commit f2736b9

Browse files
author
Kent Overstreet
committed
bcachefs: Fix rcu_read_lock() leak in drop_extra_replicas
Signed-off-by: Kent Overstreet <[email protected]>
1 parent 7124a89 commit f2736b9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/bcachefs/data_update.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,8 @@ static int __bch2_data_update_index_update(struct btree_trans *trans,
202202
bch2_bkey_durability(c, bkey_i_to_s_c(&new->k_i));
203203

204204
/* Now, drop excess replicas: */
205-
restart_drop_extra_replicas:
206-
207205
rcu_read_lock();
206+
restart_drop_extra_replicas:
208207
bkey_for_each_ptr_decode(old.k, bch2_bkey_ptrs(bkey_i_to_s(insert)), p, entry) {
209208
unsigned ptr_durability = bch2_extent_ptr_durability(c, &p);
210209

0 commit comments

Comments
 (0)