Skip to content

Commit 4aa846f

Browse files
committed
rcu: Make rcutree_dying_cpu() use its "cpu" parameter
The CPU-hotplug functions take a "cpu" parameter, but rcutree_dying_cpu() ignores it in favor of this_cpu_ptr(). This works at the moment, but it would be better to be consistent. This might also work better given some possible future changes. This commit therefore uses per_cpu_ptr() to avoid ignoring the rcutree_dying_cpu() function's argument. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 768f5d5 commit 4aa846f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2356,7 +2356,7 @@ rcu_check_quiescent_state(struct rcu_data *rdp)
23562356
int rcutree_dying_cpu(unsigned int cpu)
23572357
{
23582358
bool blkd;
2359-
struct rcu_data *rdp = this_cpu_ptr(&rcu_data);
2359+
struct rcu_data *rdp = per_cpu_ptr(&rcu_data, cpu);
23602360
struct rcu_node *rnp = rdp->mynode;
23612361

23622362
if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))

0 commit comments

Comments
 (0)