summaryrefslogtreecommitdiffstats
path: root/kernel/locking
diff options
context:
space:
mode:
authorMukesh Ojha <mojha@codeaurora.org>2019-07-31 17:05:04 +0200
committerPeter Zijlstra <peterz@infradead.org>2019-08-06 12:49:16 +0200
commita037d269221c0ae15f47046757afcbd1a7177bbf (patch)
tree22106c7e0a6ac095a5c95a5809bd594567e483bc /kernel/locking
parentlocking/mutex: Make __mutex_owner static to mutex.c (diff)
downloadlinux-a037d269221c0ae15f47046757afcbd1a7177bbf.tar.xz
linux-a037d269221c0ae15f47046757afcbd1a7177bbf.zip
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 <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-2-git-send-email-mojha@codeaurora.org
Diffstat (limited to 'kernel/locking')
-rw-r--r--kernel/locking/mutex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index ac4929f1e085..b4bcb0236d7a 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)