mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-16 18:26:42 +00:00
rcu/srcutiny: don't return before reenabling preemption
Code after the return statement is dead. Enable preemption before returning from srcu_drive_gp(). This will be important when/if PREEMPT_AUTO (lazy resched) gets merged. Fixes: 65b4a59557f6 ("srcu: Make Tiny SRCU explicitly disable preemption") Reviewed-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
This commit is contained in:
parent
d4e287d7ca
commit
0ea3acbc80
@ -122,8 +122,8 @@ void srcu_drive_gp(struct work_struct *wp)
|
|||||||
ssp = container_of(wp, struct srcu_struct, srcu_work);
|
ssp = container_of(wp, struct srcu_struct, srcu_work);
|
||||||
preempt_disable(); // Needed for PREEMPT_AUTO
|
preempt_disable(); // Needed for PREEMPT_AUTO
|
||||||
if (ssp->srcu_gp_running || ULONG_CMP_GE(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max))) {
|
if (ssp->srcu_gp_running || ULONG_CMP_GE(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max))) {
|
||||||
return; /* Already running or nothing to do. */
|
|
||||||
preempt_enable();
|
preempt_enable();
|
||||||
|
return; /* Already running or nothing to do. */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove recently arrived callbacks and wait for readers. */
|
/* Remove recently arrived callbacks and wait for readers. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user