lkml.org 
[lkml]   [2008]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] LOCKDEP: minor fix for debug_show_all_locks()

* sniper <s3c24xx@gmail.com> wrote:

> 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.

well spotted!

Minor nit:

> --- 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) {

please move the "if (count != 10)" line into the else section of the
trylock, instead of introducing a label and a goto.

Ingo


\
 
 \ /
  Last update: 2008-10-28 09:31    [W:2.249 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site