locking/mutex: Make __mutex_owner static to mutex.c
authorMukesh Ojha <mojha@codeaurora.org>
Wed, 31 Jul 2019 15:05:03 +0000 (20:35 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 6 Aug 2019 10:49:16 +0000 (12:49 +0200)
commit5f35d5a66b3ec62cb5ec4ec2ad9aebe2ac325673
treedf9ea73b10d8939415d4931b8d5ec949fcd463bd
parent24a376d65177009a4dd8d846543c5dc69f5c4ced
locking/mutex: Make __mutex_owner static to mutex.c

__mutex_owner() should only be used by the mutex api's.
So, to put this restiction let's move the __mutex_owner()
function definition from linux/mutex.h to mutex.c file.

There exist functions that uses __mutex_owner() like
mutex_is_locked() and mutex_trylock_recursive(), So
to keep legacy thing intact move them as well and
export them.

Move mutex_waiter structure also to keep it private to the
file.

Signed-off-by: Mukesh Ojha <mojha@codeaurora.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: mingo@redhat.com
Cc: will@kernel.org
Link: https://lkml.kernel.org/r/1564585504-3543-1-git-send-email-mojha@codeaurora.org
include/linux/mutex.h
kernel/locking/mutex.c
kernel/locking/mutex.h