Jerome Marchand 99dc829256 procfs: fix numbering in /proc/locks
The lock number in /proc/locks (first field) is implemented by a counter
(private field of struct seq_file) which is incremented at each call of
locks_show() and reset to 1 in locks_start() whatever the offset is.  It
should be reset according to the actual position in the list.  Because of
this, the numbering erratically restarts at 1 several times when reading a
long /proc/locks file.

Moreover, locks_show() can be called twice to print a single line thus
skipping a number.  The counter should be incremented in locks_next().

And last, pos is a loff_t, which can be bigger than a pointer, so we don't
use the pointer as an integer anymore, and allocate a loff_t instead.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-26 16:52:13 -07:00
..
2010-06-16 18:05:05 +02:00
2010-10-04 21:10:35 +02:00
2010-10-25 08:02:40 -07:00
2010-08-18 01:01:33 -04:00
2010-10-21 18:48:09 +02:00
2010-10-26 16:52:12 -07:00
2010-10-04 21:10:45 +02:00
2010-10-04 21:10:50 +02:00
2010-10-26 16:52:06 -07:00
2010-10-04 21:10:41 +02:00
2010-10-21 18:48:04 +02:00
2010-09-16 20:52:58 +02:00
2010-08-18 08:35:48 -04:00
2010-10-26 16:52:05 -07:00
2010-10-15 15:53:27 +02:00
2010-08-18 08:35:48 -04:00
2010-08-18 08:35:46 -04:00
2010-08-18 08:35:48 -04:00
2010-10-26 16:52:13 -07:00
2010-08-18 08:35:48 -04:00
2010-08-18 08:35:47 -04:00
2010-08-18 08:35:48 -04:00
2010-10-15 15:53:46 +02:00
2010-08-09 16:48:44 -04:00
2010-08-18 08:35:48 -04:00
2010-08-09 16:47:43 -04:00