Skip to content

Commit a037d26

Browse files
Mukesh OjhaPeter Zijlstra
authored andcommitted
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
1 parent 5f35d5a commit a037d26

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/locking/mutex.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ EXPORT_SYMBOL(__mutex_init);
8585
*/
8686
static inline struct task_struct *__mutex_owner(struct mutex *lock)
8787
{
88-
return (struct task_struct *)(atomic_long_read(&lock->owner) & ~0x07);
88+
return (struct task_struct *)(atomic_long_read(&lock->owner) & ~MUTEX_FLAGS);
8989
}
9090

9191
static inline struct task_struct *__owner_task(unsigned long owner)

0 commit comments

Comments
 (0)