Commit 84cee9e7 authored by Paul E. McKenney's avatar Paul E. McKenney Committed by Frederic Weisbecker
Browse files

locktorture: Consolidate "if" statements in lock_torture_writer()



There is a pair of adjacent "if" statements with identical conditions in
the lock_torture_writer() function.  This commit therefore combines them.

Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
parent 31742a56
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -889,11 +889,10 @@ static int lock_torture_writer(void *arg)
			lock_is_write_held = true;
			if (WARN_ON_ONCE(atomic_read(&lock_is_read_held)))
				lwsp->n_lock_fail++; /* rare, but... */

			lwsp->n_lock_acquired++;
		}
		if (!skip_main_lock) {

			cxt.cur_ops->write_delay(&rand);

			lock_is_write_held = false;
			WRITE_ONCE(last_lock_release, jiffies);
			cxt.cur_ops->writeunlock(tid);