Skip to content
Commit f84a15b9 authored by Jinliang Zheng's avatar Jinliang Zheng Committed by Boqun Feng
Browse files

locking/rwsem: Use OWNER_NONSPINNABLE directly instead of OWNER_SPINNABLE



After commit 7d43f1ce ("locking/rwsem: Enable time-based spinning on
reader-owned rwsem"), OWNER_SPINNABLE contains all possible values except
OWNER_NONSPINNABLE, namely OWNER_NULL | OWNER_WRITER | OWNER_READER.

Therefore, it is better to use OWNER_NONSPINNABLE directly to determine
whether to exit optimistic spin.

And, remove useless OWNER_SPINNABLE to simplify the code.

Signed-off-by: default avatarJinliang Zheng <alexjlzheng@tencent.com>
Acked-by: default avatarWaiman Long <longman@redhat.com>
Signed-off-by: default avatarBoqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20250610130158.4876-1-alexjlzheng@tencent.com
parent 99214efe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment