Commit f2736b9c authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: Fix rcu_read_lock() leak in drop_extra_replicas

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 7124a898
...@@ -202,9 +202,8 @@ static int __bch2_data_update_index_update(struct btree_trans *trans, ...@@ -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)); bch2_bkey_durability(c, bkey_i_to_s_c(&new->k_i));
/* Now, drop excess replicas: */ /* Now, drop excess replicas: */
restart_drop_extra_replicas:
rcu_read_lock(); rcu_read_lock();
restart_drop_extra_replicas:
bkey_for_each_ptr_decode(old.k, bch2_bkey_ptrs(bkey_i_to_s(insert)), p, entry) { 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); unsigned ptr_durability = bch2_extent_ptr_durability(c, &p);
......
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