Messages in this thread Patch in this message | | | From | Mukesh Ojha <> | Subject | [PATCH 2/2] locking/mutex: Use mutex flags macro instead of hard code value | Date | Mon, 29 Jul 2019 16:22:58 +0530 |
| |
Let's use the mutex flag macro(which got moved from mutex.c to linux/mutex.h in the last patch) instead of hard code value which was used in __mutex_owner().
Signed-off-by: Mukesh Ojha <mojha@codeaurora.org> --- include/linux/mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 79b28be..c3833ba 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -87,7 +87,7 @@ struct mutex { */ 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); } /* -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
| |