浏览代码

lockdep: minor fix for debug_show_all_locks()

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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
qinghuang feng 16 年之前
父节点
当前提交
46fec7ac40
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      kernel/lockdep.c

+ 3 - 2
kernel/lockdep.c

@@ -3417,9 +3417,10 @@ retry:
 		}
 		}
 		printk(" ignoring it.\n");
 		printk(" ignoring it.\n");
 		unlock = 0;
 		unlock = 0;
+	} else {
+		if (count != 10)
+			printk(KERN_CONT " locked it.\n");
 	}
 	}
-	if (count != 10)
-		printk(" locked it.\n");
 
 
 	do_each_thread(g, p) {
 	do_each_thread(g, p) {
 		/*
 		/*