rcutorture: Remove redundant RTWS_DEF_FREE check
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 2 Aug 2022 17:22:12 +0000 (10:22 -0700)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 31 Aug 2022 12:08:07 +0000 (05:08 -0700)
This check does nothing because the state at this point in the code
because the rcu_torture_writer_state value is guaranteed to instead
be RTWS_REPLACE.  This commit therefore removes this check.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcutorture.c

index 050f4d0a987ffe10b6f7b3011bf9199b40031d5e..236bd6b57277f2dfef13c1d89a634fd3121acff1 100644 (file)
@@ -1314,8 +1314,7 @@ rcu_torture_writer(void *arg)
                        if (cur_ops->get_gp_state && cur_ops->poll_gp_state) {
                                idx = cur_ops->readlock();
                                cookie = cur_ops->get_gp_state();
-                               WARN_ONCE(rcu_torture_writer_state != RTWS_DEF_FREE &&
-                                         cur_ops->poll_gp_state(cookie),
+                               WARN_ONCE(cur_ops->poll_gp_state(cookie),
                                          "%s: Cookie check 1 failed %s(%d) %lu->%lu\n",
                                          __func__,
                                          rcu_torture_writer_state_getname(),