summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/rcu_pending.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-09-22 01:11:36 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-12-21 01:36:14 -0500
commita55e2d78eac840cf156445492403ea3ac0a1b1eb (patch)
tree199a749b3ada849a8f03a4f932e74a2a4aea9b9d /fs/bcachefs/rcu_pending.c
parentbcachefs: __bch2_key_has_snapshot_overwrites uses for_each_btree_key_reverse_... (diff)
downloadlinux-a55e2d78eac840cf156445492403ea3ac0a1b1eb.tar.gz
linux-a55e2d78eac840cf156445492403ea3ac0a1b1eb.zip
bcachefs: rcu_pending: don't invoke __call_rcu() under lock
In userspace we don't (yet) have an SRCU implementation, so call_srcu() recurses. But we don't want to be invoking it under the lock anyways. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/rcu_pending.c')
-rw-r--r--fs/bcachefs/rcu_pending.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/rcu_pending.c b/fs/bcachefs/rcu_pending.c
index 40a20192eee8..67522aa344a7 100644
--- a/fs/bcachefs/rcu_pending.c
+++ b/fs/bcachefs/rcu_pending.c
@@ -478,7 +478,9 @@ start_gp:
*/
if (!p->cb_armed) {
p->cb_armed = true;
+ spin_unlock_irqrestore(&p->lock, flags);
__call_rcu(pending->srcu, &p->cb, rcu_pending_rcu_cb);
+ goto free_node;
} else {
__start_poll_synchronize_rcu(pending->srcu);
}