diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2019-07-04 15:13:23 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2019-07-25 15:51:54 +0200 |
commit | 7b3c92b85a65c2db1f542265bc98e1f9e3056eba (patch) | |
tree | 14ce7357c1f489793d3989db344d6782e85824f8 /kernel/locking/rtmutex.c | |
parent | 3c29e651e16dd3b3179cfb2d055ee9538e37515c (diff) | |
download | linux-stable-7b3c92b85a65c2db1f542265bc98e1f9e3056eba.tar.gz linux-stable-7b3c92b85a65c2db1f542265bc98e1f9e3056eba.tar.bz2 linux-stable-7b3c92b85a65c2db1f542265bc98e1f9e3056eba.zip |
sched/core: Convert get_task_struct() to return the task
Returning the pointer that was passed in allows us to write
slightly more idiomatic code. Convert a few users.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190704221323.24290-1-willy@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/rtmutex.c')
-rw-r--r-- | kernel/locking/rtmutex.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index fa83d36e30c6..2874bf556162 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -628,8 +628,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, } /* [10] Grab the next task, i.e. owner of @lock */ - task = rt_mutex_owner(lock); - get_task_struct(task); + task = get_task_struct(rt_mutex_owner(lock)); raw_spin_lock(&task->pi_lock); /* @@ -709,8 +708,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, } /* [10] Grab the next task, i.e. the owner of @lock */ - task = rt_mutex_owner(lock); - get_task_struct(task); + task = get_task_struct(rt_mutex_owner(lock)); raw_spin_lock(&task->pi_lock); /* [11] requeue the pi waiters if necessary */ |