From: Kent Overstreet Date: Sun, 22 Sep 2024 05:11:36 +0000 (-0400) Subject: bcachefs: rcu_pending: don't invoke __call_rcu() under lock X-Git-Tag: v6.14-rc1~204^2~261 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a55e2d78eac840cf156445492403ea3ac0a1b1eb;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/fs/bcachefs/rcu_pending.c b/fs/bcachefs/rcu_pending.c index 40a20192eee89..67522aa344a73 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); }