OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Rework /proc/locks via seq_files and seq_list helpers (v2)
Re: [PATCH] Rework /proc/locks via seq_files and seq_list helpers (v2) [message #20534 is a reply to message #20533] Thu, 20 September 2007 08:46 Go to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
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@openvz.org>

OOPS! Please disregard, wrong comment was copied :(
 
Read Message
Read Message
Previous Topic: [PATCH] Fix potential OOPS in generic_setlease()
Next Topic: [PATCH] Fix potential OOPS in generic_setlease() (v2)
Goto Forum:
  


Current Time: Fri Oct 10 17:36:51 GMT 2025

Total time taken to generate the page: 0.15387 seconds