]> git.baikalelectronics.ru Git - kernel.git/commit
Rework /proc/locks via seq_files and seq_list helpers
authorPavel Emelyanov <xemul@openvz.org>
Mon, 1 Oct 2007 21:41:15 +0000 (14:41 -0700)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 9 Oct 2007 22:32:46 +0000 (18:32 -0400)
commitdf6e6ba72965aa8fd08f0d8d55778515f80fd950
tree1231947efa06478714eeabac3bdbffc663f453c7
parent9455a04eb0c46377c688f9627850f7f7380401ce
Rework /proc/locks via seq_files and seq_list helpers

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.

[akpm@linux-foundation.org: no externs in C]
[akpm@linux-foundation.org: warning fixes]
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/locks.c
fs/proc/proc_misc.c
include/linux/fs.h