Skip to content
Snippets Groups Projects
  • Pavel Emelyanov's avatar
    7f8ada98
    Rework /proc/locks via seq_files and seq_list helpers · 7f8ada98
    Pavel Emelyanov authored
    
    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: default avatarPavel Emelyanov <xemul@openvz.org>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    7f8ada98
    History
    Rework /proc/locks via seq_files and seq_list helpers
    Pavel Emelyanov authored
    
    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: default avatarPavel Emelyanov <xemul@openvz.org>
    Cc: "J. Bruce Fields" <bfields@fieldses.org>
    Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>