From: Kent Overstreet Date: Tue, 11 Jun 2024 22:59:08 +0000 (-0400) Subject: bcachefs: Fix rcu_read_lock() leak in drop_extra_replicas X-Git-Tag: v6.10-rc4~30^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2736b9c791a126ecb9cfc1aef1c7b4152b66e2d;p=thirdparty%2Fkernel%2Flinux.git bcachefs: Fix rcu_read_lock() leak in drop_extra_replicas Signed-off-by: Kent Overstreet --- diff --git a/fs/bcachefs/data_update.c b/fs/bcachefs/data_update.c index 0d807c2ce9c67..1a0072eef109b 100644 --- a/fs/bcachefs/data_update.c +++ b/fs/bcachefs/data_update.c @@ -202,9 +202,8 @@ restart_drop_conflicting_replicas: 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);