1. 17 Jan, 2011 12 commits
    • Namhyung Kim's avatar
      compat: update comment of compat statfs syscalls · 974d879e
      Namhyung Kim authored
      The commit 7ed1ee61 ("Take statfs variants to fs/statfs.c")
      separates out statfs syscalls from fs/open.c. Thus the comment
      should be changed also.
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Cc: Jiri Kosina <trivial@kernel.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      974d879e
    • Namhyung Kim's avatar
      compat: remove unnecessary assignment in compat_rw_copy_check_uvector() · 6a5640f1
      Namhyung Kim authored
      *@ret_pointer is initialized to @fast_pointer thus the assignment is
      redundant.
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Cc: Jeff Moyer <jmoyer@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      6a5640f1
    • Randy Dunlap's avatar
      fs: FS_POSIX_ACL does not depend on BLOCK · 16ebe911
      Randy Dunlap authored
      - Fix a kconfig unmet dependency warning.
      - Remove the comment that identifies which filesystems use POSIX ACL
        utility routines.
      - Move the FS_POSIX_ACL symbol outside of the BLOCK symbol if/endif block
        because its functions do not depend on BLOCK and some of the filesystems
        that use it do not depend on BLOCK.
      
      warning: (GENERIC_ACL && JFFS2_FS_POSIX_ACL && NFSD_V4 && NFS_ACL_SUPPORT && 9P_FS_POSIX_ACL) selects FS_POSIX_ACL which has unmet direct dependencies (BLOCK)
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      16ebe911
    • Steven Rostedt's avatar
      fs: Remove unlikely() from fget_light() · 3bc0ba43
      Steven Rostedt authored
      There's an unlikely() in fget_light() that assumes the file ref count
      will be 1. Running the annotate branch profiler on a desktop that is
      performing daily tasks (running firefox, evolution, xchat and is also part
      of a distcc farm), it shows that the ref count is not 1 that often.
      
       correct incorrect      %    Function                  File              Line
       ------- ---------      -    --------                  ----              ----
      1035099358 6209599193  85    fget_light              file_table.c         315
      
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      3bc0ba43
    • 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 28 commits