Skip to content

Commit

Permalink
lockdep: Fix missing entry in /proc/lock_stat
Browse files Browse the repository at this point in the history
One entry is missing in the output of /proc/lock_stat.

The cause is, when ls_start() is called the 2nd time, we should
start from stats[@POS-1] but not stats[@pos], because pos == 0
is the header.

Signed-off-by: Li Zefan <[email protected]>
Cc: Peter Zijlstra <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Li Zefan authored and Ingo Molnar committed Aug 17, 2009
1 parent 9062920 commit 2122743
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/lockdep_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ static void *ls_start(struct seq_file *m, loff_t *pos)
if (*pos == 0)
return SEQ_START_TOKEN;

data->iter = data->stats + *pos;
data->iter = data->stats + (*pos - 1);
if (data->iter >= data->iter_end)
data->iter = NULL;

Expand Down

0 comments on commit 2122743

Please sign in to comment.