[PATCH] LOCKDEP: minor fix for debug_show_all_locks()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: sniper
Date: Monday, October 27, 2008 - 1:03 pm

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] LOCKDEP: minor fix for debug_show_all_locks(), sniper, (Mon Oct 27, 1:03 pm)
Re: [PATCH] LOCKDEP: minor fix for debug_show_all_locks(), qinghuang feng, (Tue Oct 28, 2:24 am)