]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
rcutorture: Remove redundant rcutorture_one_extend() from rcu_torture_one_read()
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 5 Nov 2025 20:20:00 +0000 (12:20 -0800)
committerFrederic Weisbecker <frederic@kernel.org>
Wed, 5 Nov 2025 23:03:15 +0000 (00:03 +0100)
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>
kernel/rcu/rcutorture.c

index 29fe3c01312f60ebac23a99aaaf24d619d54b73b..09cdd682c755a09b00c2e92fb81c1043d7a5fdce 100644 (file)
@@ -2384,10 +2384,8 @@ static bool rcu_torture_one_read(struct torture_random_state *trsp, long myid)
        newstate = rcutorture_extend_mask(rtors.readstate, trsp);
        WARN_ON_ONCE(newstate & RCUTORTURE_RDR_UPDOWN);
        rcutorture_one_extend(&rtors.readstate, newstate, trsp, rtors.rtrsp++);
-       if (!rcu_torture_one_read_start(&rtors, trsp, myid)) {
-               rcutorture_one_extend(&rtors.readstate, 0, trsp, rtors.rtrsp);
+       if (!rcu_torture_one_read_start(&rtors, trsp, myid))
                return false;
-       }
        rtors.rtrsp = rcutorture_loop_extend(&rtors.readstate, trsp, rtors.rtrsp);
        rcu_torture_one_read_end(&rtors, trsp);
        return true;