]> git.baikalelectronics.ru Git - kernel.git/commit
locking/lockdep: Change the meaning of check_prev_add()'s return value
authorByungchul Park <byungchul.park@lge.com>
Mon, 7 Aug 2017 07:12:50 +0000 (16:12 +0900)
committerIngo Molnar <mingo@kernel.org>
Thu, 10 Aug 2017 10:29:06 +0000 (12:29 +0200)
commit8320d863167a3ed0fc8d9eec26ecabbf6ca988c7
treebaebf222c9089599a6df844ad01a2840c7cf07cf
parenta779baf8d5941b87e827e845995ebeb62445ba6f
locking/lockdep: Change the meaning of check_prev_add()'s return value

Firstly, return 1 instead of 2 when 'prev -> next' dependency already
exists. Since the value 2 is not referenced anywhere, just return 1
indicating success in this case.

Secondly, return 2 instead of 1 when successfully added a lock_list
entry with saving stack_trace. With that, a caller can decide whether
to avoid redundant save_trace() on the caller site.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
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>
Cc: akpm@linux-foundation.org
Cc: boqun.feng@gmail.com
Cc: kernel-team@lge.com
Cc: kirill@shutemov.name
Cc: npiggin@gmail.com
Cc: walken@google.com
Cc: willy@infradead.org
Link: http://lkml.kernel.org/r/1502089981-21272-4-git-send-email-byungchul.park@lge.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/locking/lockdep.c