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

Pavel Emelyanov xemul at openvz.org
Thu Sep 20 01:46:09 PDT 2007


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 and the seq_list_XXX() helpers.
> 
> This saves (as usually) 16 lines of code and more than 200 from
> the .text section.
> 
> This patch looks rather ugly, as diff often uses curly braces
> as not-changed lines, but I haven't managed to organize the 
> code to make diff look better. Except for move the whole proc
> related stuff upper/lower in the locks.c file...
> 
> Fixed the problem, spotted by J. Bruce Fields, about the fl
> variable reuse.
> 
> Signed-off-by: Pavel Emelyanov <xemul at openvz.org>

OOPS! Please disregard, wrong comment was copied :(




More information about the Devel mailing list