]> git.baikalelectronics.ru Git - kernel.git/commit
locking/rwsem: No need to check for handoff bit if wait queue empty
authorWaiman Long <longman@redhat.com>
Tue, 22 Mar 2022 15:20:57 +0000 (11:20 -0400)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 5 Apr 2022 08:24:34 +0000 (10:24 +0200)
commit8bd3a8aaa61538d2d3b0b57d64ebb1d2e9b893c6
tree6e6139c7bf141b171e76a16fc9495d22d2573eeb
parent321c6a52b789cbae58697d5a291c106aea7fae58
locking/rwsem: No need to check for handoff bit if wait queue empty

Since commit 5283580f8c60 ("locking/rwsem: Make handoff bit handling
more consistent"), the handoff bit is always cleared if the wait queue
becomes empty. There is no need to check for RWSEM_FLAG_HANDOFF when
the wait list is known to be empty.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20220322152059.2182333-2-longman@redhat.com
kernel/locking/rwsem.c