Skip to content

Commit

Permalink
bcachefs: Fix rcu_read_lock() leak in drop_extra_replicas
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
  • Loading branch information
Kent Overstreet committed Jun 11, 2024
1 parent 7124a89 commit f2736b9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/bcachefs/data_update.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,8 @@ static int __bch2_data_update_index_update(struct btree_trans *trans,
bch2_bkey_durability(c, bkey_i_to_s_c(&new->k_i));

/* Now, drop excess replicas: */
restart_drop_extra_replicas:

rcu_read_lock();
restart_drop_extra_replicas:
bkey_for_each_ptr_decode(old.k, bch2_bkey_ptrs(bkey_i_to_s(insert)), p, entry) {
unsigned ptr_durability = bch2_extent_ptr_durability(c, &p);

Expand Down

0 comments on commit f2736b9

Please sign in to comment.