Commit 4609c4f9 authored by Yuyang Du's avatar Yuyang Du Committed by Ingo Molnar

locking/lockdep: Remove redundant argument in check_deadlock

In check_deadlock(), the third argument read comes from the second
argument hlock so that it can be removed. No functional change.
Signed-off-by: default avatarYuyang Du <duyuyang@gmail.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bvanassche@acm.org
Cc: frederic@kernel.org
Cc: ming.lei@redhat.com
Cc: will.deacon@arm.com
Link: https://lkml.kernel.org/r/20190506081939.74287-18-duyuyang@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 1ac4ba5e
...@@ -2246,7 +2246,7 @@ print_deadlock_bug(struct task_struct *curr, struct held_lock *prev, ...@@ -2246,7 +2246,7 @@ print_deadlock_bug(struct task_struct *curr, struct held_lock *prev,
* Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read * Returns: 0 on deadlock detected, 1 on OK, 2 on recursive read
*/ */
static int static int
check_deadlock(struct task_struct *curr, struct held_lock *next, int read) check_deadlock(struct task_struct *curr, struct held_lock *next)
{ {
struct held_lock *prev; struct held_lock *prev;
struct held_lock *nest = NULL; struct held_lock *nest = NULL;
...@@ -2265,7 +2265,7 @@ check_deadlock(struct task_struct *curr, struct held_lock *next, int read) ...@@ -2265,7 +2265,7 @@ check_deadlock(struct task_struct *curr, struct held_lock *next, int read)
* Allow read-after-read recursion of the same * Allow read-after-read recursion of the same
* lock class (i.e. read_lock(lock)+read_lock(lock)): * lock class (i.e. read_lock(lock)+read_lock(lock)):
*/ */
if ((read == 2) && prev->read) if ((next->read == 2) && prev->read)
return 2; return 2;
/* /*
...@@ -2839,7 +2839,7 @@ static int validate_chain(struct task_struct *curr, ...@@ -2839,7 +2839,7 @@ static int validate_chain(struct task_struct *curr,
* The simple case: does the current hold the same lock * The simple case: does the current hold the same lock
* already? * already?
*/ */
int ret = check_deadlock(curr, hlock, hlock->read); int ret = check_deadlock(curr, hlock);
if (!ret) if (!ret)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment