When we failed to get tasklist_lock eventually (count equals 0),
we should only print " ignoring it.\n", and not print
" locked it.\n" needlessly.
Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
---
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index dbda475..12bf812 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -3417,10 +3417,12 @@ retry:
}
printk(" ignoring it.\n");
unlock = 0;
+ goto print_locks;
}
if (count != 10)
printk(" locked it.\n");
+print_locks:
do_each_thread(g, p) {
/*
* It's not reliable to print a task's held locks
--