diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-06-23 12:11:17 -0700 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2017-08-14 14:32:46 +0530 |
commit | 286f536cbfe03c0a10ddac2fc214d805c494e4c0 (patch) | |
tree | 4600dd17f881e3e597022f273a51bb8eb718c199 /kernel/locking/mutex.c | |
parent | e991aa38ea3856f3fb8f66b30fa44c4e85b502cd (diff) |
UPSTREAM: locking: avoid passing around 'thread_info' in mutex debugging code
commit 6720a305df74ca30bcc10fc316881641b6ff0c80 upstream.
None of the code actually wants a thread_info, it all wants a
task_struct, and it's just converting back and forth between the two
("ti->task" to get the task_struct from the thread_info, and
"task_thread_info(task)" to go the other way).
No semantic change.
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: Idd7d0fe0b2b57ece9a969d178576a12f3ae90701
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'kernel/locking/mutex.c')
-rw-r--r-- | kernel/locking/mutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c index 89350f924c85..f42f83a36506 100644 --- a/kernel/locking/mutex.c +++ b/kernel/locking/mutex.c @@ -537,7 +537,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, goto skip_wait; debug_mutex_lock_common(lock, &waiter); - debug_mutex_add_waiter(lock, &waiter, task_thread_info(task)); + debug_mutex_add_waiter(lock, &waiter, task); /* add waiting tasks to the end of the waitqueue (FIFO): */ list_add_tail(&waiter.list, &lock->wait_list); @@ -584,7 +584,7 @@ __mutex_lock_common(struct mutex *lock, long state, unsigned int subclass, } __set_task_state(task, TASK_RUNNING); - mutex_remove_waiter(lock, &waiter, current_thread_info()); + mutex_remove_waiter(lock, &waiter, task); /* set it to 0 if there are no waiters left: */ if (likely(list_empty(&lock->wait_list))) atomic_set(&lock->count, 0); @@ -605,7 +605,7 @@ skip_wait: return 0; err: - mutex_remove_waiter(lock, &waiter, task_thread_info(task)); + mutex_remove_waiter(lock, &waiter, task); spin_unlock_mutex(&lock->wait_lock, flags); debug_mutex_free_waiter(&waiter); mutex_release(&lock->dep_map, 1, ip); |