From: Mukesh Ojha Date: Wed, 31 Jul 2019 15:05:04 +0000 (+0530) Subject: locking/mutex: Use mutex flags macro instead of hard code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a037d269221c0ae15f47046757afcbd1a7177bbf;p=linux.git locking/mutex: Use mutex flags macro instead of hard code Use the mutex flag macro instead of hard code value inside __mutex_owner(). Signed-off-by: Mukesh Ojha Signed-off-by: Peter Zijlstra (Intel) Cc: mingo@redhat.com Cc: will@kernel.org Link: https://lkml.kernel.org/r/1564585504-3543-2-git-send-email-mojha@codeaurora.org --- diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index ac4929f1e085e..b4bcb0236d7a1 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c @@ -85,7 +85,7 @@ EXPORT_SYMBOL(__mutex_init); */ static inline struct task_struct *__mutex_owner(struct mutex *lock) { - return (struct task_struct *)(atomic_long_read(&lock->owner) & ~0x07); + return (struct task_struct *)(atomic_long_read(&lock->owner) & ~MUTEX_FLAGS); } static inline struct task_struct *__owner_task(unsigned long owner)