1. 17 Jan, 2011 8 commits
    • Steven Rostedt's avatar
      fs: Remove unlikely() from fput_light() · c2b3e74b
      Steven Rostedt authored
      In fput_light(), there's an unlikely(fput_needed), which running on
      my normal desktop doing firefox, xchat, evolution and part of my distcc farm,
      and running the annotate branch profiler shows that the unlikely is not
      very unlikely.
      
       correct incorrect  %        Function             File              Line
       ------- ---------  -        --------             ----              ----
             0       48 100 fput_light                file.h               26
      115828710 897415279  88 fput_light              file.h               26
      865271179 5286128445  85 fput_light             file.h               26
      19568539  8923664  31 fput_light                file.h               26
      12353677  3562279  22 fput_light                file.h               26
        267691    67062  20 fput_light                file.h               26
      15014853   348172   2 fput_light                file.h               26
        209258      205   0 fput_light                file.h               26
       1364164        0   0 fput_light                file.h               26
      
      Which gives 1032903812 times it was correct and 6203351846 times it was
      incorrect, or 85% incorrect.
      
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      c2b3e74b
    • Christoph Hellwig's avatar
      fallocate should be a file operation · 2fe17c10
      Christoph Hellwig authored
      Currently all filesystems except XFS implement fallocate asynchronously,
      while XFS forced a commit.  Both of these are suboptimal - in case of O_SYNC
      I/O we really want our allocation on disk, especially for the !KEEP_SIZE
      case where we actually grow the file with user-visible zeroes.  On the
      other hand always commiting the transaction is a bad idea for fast-path
      uses of fallocate like for example in recent Samba versions.   Given
      that block allocation is a data plane operation anyway change it from
      an inode operation to a file operation so that we have the file structure
      available that lets us check for O_SYNC.
      
      This also includes moving the code around for a few of the filesystems,
      and remove the already unnedded S_ISDIR checks given that we only wire
      up fallocate for regular files.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      2fe17c10
    • Christoph Hellwig's avatar
      make the feature checks in ->fallocate future proof · 64c23e86
      Christoph Hellwig authored
      Instead of various home grown checks that might need updates for new
      flags just check for any bit outside the mask of the features supported
      by the filesystem.  This makes the check future proof for any newly
      added flag.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      64c23e86
    • Yang Ruirui's avatar
      staging: smbfs building fix · eb745dbc
      Yang Ruirui authored
      Building error for smbfs:
      
      drivers/staging/smbfs/dir.c:286: error: static declaration of 'smbfs_dentry_operations' follows non-static declaration
      drivers/staging/smbfs/proto.h:42: error: previous declaration of 'smbfs_dentry_operations' was here
      drivers/staging/smbfs/dir.c:294: error: static declaration of 'smbfs_dentry_operations_case' follows non-static declaration
      drivers/staging/smbfs/proto.h:41: error: previous declaration of 'smbfs_dentry_operations_case' was here
      make[3]: *** [drivers/staging/smbfs/dir.o] Error 1
      make[2]: *** [drivers/staging/smbfs] Error 2
      make[1]: *** [drivers/staging] Error 2
      make[1]: *** Waiting for unfinished jobs....
      
      Fix it by removing static keywords
      Signed-off-by: default avatarYang Ruirui <ruirui.r.yang@tieto.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      eb745dbc
    • Al Viro's avatar
      tidy up around finish_automount() · b1e75df4
      Al Viro authored
      do_add_mount() and mnt_clear_expiry() are not needed outside of
      namespace.c anymore, now that namei has finish_automount() to
      use.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      b1e75df4
    • Al Viro's avatar
      don't drop newmnt on error in do_add_mount() · 15f9a3f3
      Al Viro authored
      That gets rid of the kludge in finish_automount() - we need
      to keep refcount on the vfsmount as-is until we evict it from
      expiry list.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      15f9a3f3
    • Al Viro's avatar
      Take the completion of automount into new helper · 19a167af
      Al Viro authored
      ... and shift it from namei.c to namespace.c
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      19a167af
    • Andrew Morton's avatar
      drivers/nfc/pn544.c: fix min_t warnings · e78bf5e6
      Andrew Morton authored
      Fix these:
      
        drivers/nfc/pn544.c: In function 'pn544_read':
        drivers/nfc/pn544.c:356: warning: comparison of distinct pointer types lacks a cast
        drivers/nfc/pn544.c:377: warning: comparison of distinct pointer types lacks a cast
        drivers/nfc/pn544.c: In function 'pn544_write':
        drivers/nfc/pn544.c:463: warning: comparison of distinct pointer types lacks a cast
        drivers/nfc/pn544.c:485: warning: comparison of distinct pointer types lacks a cast
      
      Cc: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e78bf5e6
  2. 16 Jan, 2011 32 commits