[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200701055720.38092-1-qiang.zhang@windriver.com>
Date: Wed, 1 Jul 2020 13:57:20 +0800
From: <qiang.zhang@...driver.com>
To: <peterz@...radead.org>, <mingo@...hat.com>, <will@...nel.org>
CC: <linux-kernel@...r.kernel.org>
Subject: [PATCH] locking/percpu-rwsem: Remove WQ_FLAG_EXCLUSIVE flags
From: Zqiang <qiang.zhang@...driver.com>
Remove WQ_FLAG_EXCLUSIVE from "wq_entry.flags", using function
__add_wait_queue_entry_tail_exclusive substitution.
Signed-off-by: Zqiang <qiang.zhang@...driver.com>
---
kernel/locking/percpu-rwsem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/locking/percpu-rwsem.c b/kernel/locking/percpu-rwsem.c
index 8bbafe3e5203..48e1c55c2e59 100644
--- a/kernel/locking/percpu-rwsem.c
+++ b/kernel/locking/percpu-rwsem.c
@@ -148,8 +148,8 @@ static void percpu_rwsem_wait(struct percpu_rw_semaphore *sem, bool reader)
*/
wait = !__percpu_rwsem_trylock(sem, reader);
if (wait) {
- wq_entry.flags |= WQ_FLAG_EXCLUSIVE | reader * WQ_FLAG_CUSTOM;
- __add_wait_queue_entry_tail(&sem->waiters, &wq_entry);
+ wq_entry.flags |= reader * WQ_FLAG_CUSTOM;
+ __add_wait_queue_entry_tail_exclusive(&sem->waiters, &wq_entry);
}
spin_unlock_irq(&sem->waiters.lock);
--
2.24.1
Powered by blists - more mailing lists