1. 17 Jan, 2011 7 commits
    • 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 33 commits