locking: Make owner_on_cpu() into <linux/sched.h>
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 3 Dec 2021 07:59:34 +0000 (15:59 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Sat, 4 Dec 2021 09:56:25 +0000 (10:56 +0100)
commitc0bed69daf4b67809b58cc7cd81a8fa4f45bc161
tree2e5eac02c318c1145dace9791e1e53b74ca0dc49
parent9a75bd0c52df6cff44735f73dfb9d00e67969fc5
locking: Make owner_on_cpu() into <linux/sched.h>

Move the owner_on_cpu() from kernel/locking/rwsem.c into
include/linux/sched.h with under CONFIG_SMP, then use it
in the mutex/rwsem/rtmutex to simplify the code.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20211203075935.136808-2-wangkefeng.wang@huawei.com
include/linux/sched.h
kernel/locking/mutex.c
kernel/locking/rtmutex.c
kernel/locking/rwsem.c