Skip to content

Commit 0ea3acb

Browse files
michichFrederic Weisbecker
authored andcommitted
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: 65b4a59 ("srcu: Make Tiny SRCU explicitly disable preemption") Reviewed-by: Paul E. McKenney <[email protected]> Signed-off-by: Michal Schmidt <[email protected]> Reviewed-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]>
1 parent d4e287d commit 0ea3acb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/rcu/srcutiny.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ void srcu_drive_gp(struct work_struct *wp)
122122
ssp = container_of(wp, struct srcu_struct, srcu_work);
123123
preempt_disable(); // Needed for PREEMPT_AUTO
124124
if (ssp->srcu_gp_running || ULONG_CMP_GE(ssp->srcu_idx, READ_ONCE(ssp->srcu_idx_max))) {
125-
return; /* Already running or nothing to do. */
126125
preempt_enable();
126+
return; /* Already running or nothing to do. */
127127
}
128128

129129
/* Remove recently arrived callbacks and wait for readers. */

0 commit comments

Comments
 (0)