Skip to content

Commit b692dc4

Browse files
committed
rcu: Update __call_rcu() comments
The __call_rcu() function's header comment refers to a cpu argument that no longer exists, and the comment of the return path from rcu_nocb_try_bypass() ignores the non-no-CBs CPU case. This commit therefore update both comments. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent aa96a93 commit b692dc4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

kernel/rcu/tree.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2642,12 +2642,7 @@ static void check_cb_ovld(struct rcu_data *rdp)
26422642
raw_spin_unlock_rcu_node(rnp);
26432643
}
26442644

2645-
/*
2646-
* Helper function for call_rcu() and friends. The cpu argument will
2647-
* normally be -1, indicating "currently running CPU". It may specify
2648-
* a CPU only if that CPU is a no-CBs CPU. Currently, only rcu_barrier()
2649-
* is expected to specify a CPU.
2650-
*/
2645+
/* Helper function for call_rcu() and friends. */
26512646
static void
26522647
__call_rcu(struct rcu_head *head, rcu_callback_t func)
26532648
{
@@ -2688,7 +2683,7 @@ __call_rcu(struct rcu_head *head, rcu_callback_t func)
26882683
check_cb_ovld(rdp);
26892684
if (rcu_nocb_try_bypass(rdp, head, &was_alldone, flags))
26902685
return; // Enqueued onto ->nocb_bypass, so just leave.
2691-
/* If we get here, rcu_nocb_try_bypass() acquired ->nocb_lock. */
2686+
// If no-CBs CPU gets here, rcu_nocb_try_bypass() acquired ->nocb_lock.
26922687
rcu_segcblist_enqueue(&rdp->cblist, head);
26932688
if (__is_kfree_rcu_offset((unsigned long)func))
26942689
trace_rcu_kfree_callback(rcu_state.name, head,

0 commit comments

Comments
 (0)