Re: [PATCH] Rework /proc/locks via seq_files and seq_list helpers (v2)

2007-09-20 Thread Pavel Emelyanov
Pavel Emelyanov wrote: > Currently /proc/locks is shown with a proc_read function, but > its behavior is rather complex as it has to manually handle > current offset and buffer length. On the other hand, files > that show objects from lists can be easily reimplemented using > the sequential files

[PATCH] Rework /proc/locks via seq_files and seq_list helpers (v2)

2007-09-20 Thread Pavel Emelyanov
Currently /proc/locks is shown with a proc_read function, but its behavior is rather complex as it has to manually handle current offset and buffer length. On the other hand, files that show objects from lists can be easily reimplemented using the sequential files and the seq_list_XXX() helpers.

Re: [PATCH] Rework /proc/locks via seq_files and seq_list helpers

2007-09-20 Thread Pavel Emelyanov
J. Bruce Fields wrote: > On Wed, Sep 19, 2007 at 03:35:27PM +0400, Pavel Emelyanov wrote: >> Currently /proc/locks is shown with a proc_read function, but >> its behavior is rather complex as it has to manually handle >> current offset and buffer length. On the other hand, files >> that show objec

Re: [PATCH] Rework /proc/locks via seq_files and seq_list helpers

2007-09-19 Thread J. Bruce Fields
On Wed, Sep 19, 2007 at 03:35:27PM +0400, Pavel Emelyanov wrote: > Currently /proc/locks is shown with a proc_read function, but > its behavior is rather complex as it has to manually handle > current offset and buffer length. On the other hand, files > that show objects from lists can be easily r

[PATCH] Rework /proc/locks via seq_files and seq_list helpers

2007-09-19 Thread Pavel Emelyanov
Currently /proc/locks is shown with a proc_read function, but its behavior is rather complex as it has to manually handle current offset and buffer length. On the other hand, files that show objects from lists can be easily reimplemented using the sequential files and the seq_list_XXX() helpers.