Skip to content

Commit d4500d6

Browse files
paulmckrcuFrederic Weisbecker
authored andcommitted
rcutorture: Remove redundant rcutorture_one_extend() from rcu_torture_one_read()
This commit removes a harmless but potentially confusing invocation of rcutorture_one_extend() within rcu_torture_one_read(). The immediately preceding call to rcu_torture_one_read_start() already does this cleanup, and the other call to rcu_torture_one_read_start() already relies on this. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
1 parent f121fbb commit d4500d6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

kernel/rcu/rcutorture.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,10 +2384,8 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp, long myid)
23842384
newstate = rcutorture_extend_mask(rtors.readstate, trsp);
23852385
WARN_ON_ONCE(newstate & RCUTORTURE_RDR_UPDOWN);
23862386
rcutorture_one_extend(&rtors.readstate, newstate, trsp, rtors.rtrsp++);
2387-
if (!rcu_torture_one_read_start(&rtors, trsp, myid)) {
2388-
rcutorture_one_extend(&rtors.readstate, 0, trsp, rtors.rtrsp);
2387+
if (!rcu_torture_one_read_start(&rtors, trsp, myid))
23892388
return false;
2390-
}
23912389
rtors.rtrsp = rcutorture_loop_extend(&rtors.readstate, trsp, rtors.rtrsp);
23922390
rcu_torture_one_read_end(&rtors, trsp);
23932391
return true;

0 commit comments

Comments
 (0)