1. 16 Nov, 2013 1 commit
  2. 09 Nov, 2013 1 commit
  3. 25 Oct, 2013 2 commits
  4. 14 Jul, 2013 1 commit
  5. 29 Jun, 2013 1 commit
  6. 20 Dec, 2012 1 commit
  7. 18 Dec, 2012 1 commit
  8. 05 Sep, 2012 1 commit
  9. 14 Jul, 2012 2 commits
  10. 11 May, 2012 1 commit
    • Linus Torvalds's avatar
      vfs: make it possible to access the dentry hash/len as one 64-bit entry · 26fe5750
      Linus Torvalds authored
      This allows comparing hash and len in one operation on 64-bit
      architectures.  Right now only __d_lookup_rcu() takes advantage of this,
      since that is the case we care most about.
      
      The use of anonymous struct/unions hides the alternate 64-bit approach
      from most users, the exception being a few cases where we initialize a
      'struct qstr' with a static initializer.  This makes the problematic
      cases use a new QSTR_INIT() helper function for that (but initializing
      just the name pointer with a "{ .name = xyzzy }" initializer remains
      valid, as does just copying another qstr structure).
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      26fe5750
  11. 09 Apr, 2012 1 commit
    • Al Viro's avatar
      dentry leak in simple_fill_super() failure exit · 640946f2
      Al Viro authored
      d_genocide() does _not_ evict dentries; it just removes extra ref
      pinning each of those.  Normally it's followed by shrinking the
      tree (it's done just before generic_shutdown_super() by kill_litter_super()),
      but in case of simple_fill_super() nothing of that kind will follow.
      Just do shrink_dcache_parent() manually.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      640946f2
  12. 05 Apr, 2012 1 commit
  13. 21 Mar, 2012 2 commits
  14. 29 Feb, 2012 1 commit
  15. 04 Jan, 2012 1 commit
  16. 02 Nov, 2011 2 commits
  17. 22 Jul, 2011 1 commit
  18. 21 Jul, 2011 1 commit
    • Josef Bacik's avatar
      fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers · 02c24a82
      Josef Bacik authored
      Btrfs needs to be able to control how filemap_write_and_wait_range() is called
      in fsync to make it less of a painful operation, so push down taking i_mutex and
      the calling of filemap_write_and_wait() down into the ->fsync() handlers.  Some
      file systems can drop taking the i_mutex altogether it seems, like ext3 and
      ocfs2.  For correctness sake I just pushed everything down in all cases to make
      sure that we keep the current behavior the same for everybody, and then each
      individual fs maintainer can make up their mind about what to do from there.
      Thanks,
      Acked-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      02c24a82
  19. 20 Jul, 2011 2 commits
    • Al Viro's avatar
      Make ->d_sb assign-once and always non-NULL · a4464dbc
      Al Viro authored
      New helper (non-exported, fs/internal.h-only): __d_alloc(sb, name).
      Allocates dentry, sets its ->d_sb to given superblock and sets
      ->d_op accordingly.  Old d_alloc(NULL, name) callers are converted
      to that (all of them know what superblock they want).  d_alloc()
      itself is left only for parent != NULl case; uses __d_alloc(),
      inserts result into the list of parent's children.
      
      Note that now ->d_sb is assign-once and never NULL *and*
      ->d_parent is never NULL either.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      a4464dbc
    • Akinobu Mita's avatar
      fs/libfs.c: fix simple_attr_write() on 32bit machines · f7b88631
      Akinobu Mita authored
      Assume that /sys/kernel/debug/dummy64 is debugfs file created by
      debugfs_create_x64().
      
      	# cd /sys/kernel/debug
      	# echo 0x1234567812345678 > dummy64
      	# cat dummy64
      	0x0000000012345678
      
      	# echo 0x80000000 > dummy64
      	# cat dummy64
      	0xffffffff80000000
      
      A value larger than INT_MAX cannot be written to the debugfs file created
      by debugfs_create_u64 or debugfs_create_x64 on 32bit machine.  Because
      simple_attr_write() uses simple_strtol() for the conversion.
      
      To fix this, use simple_strtoll() instead.
      Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f7b88631
  20. 26 May, 2011 3 commits
  21. 13 Jan, 2011 1 commit
  22. 07 Jan, 2011 5 commits
    • Nick Piggin's avatar
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin authored
      Reduce some branches and memory accesses in dcache lookup by adding dentry
      flags to indicate common d_ops are set, rather than having to check them.
      This saves a pointer memory access (dentry->d_op) in common path lookup
      situations, and saves another pointer load and branch in cases where we
      have d_op but not the particular operation.
      
      Patched with:
      
      git grep -E '[.>]([[:space:]])*d_op([[:space:]])*=' | xargs sed -e 's/\([^\t ]*\)->d_op = \(.*\);/d_set_d_op(\1, \2);/' -e 's/\([^\t ]*\)\.d_op = \(.*\);/d_set_d_op(\&\1, \2);/' -i
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      fb045adb
    • Nick Piggin's avatar
      fs: dcache remove dcache_lock · b5c84bf6
      Nick Piggin authored
      dcache_lock no longer protects anything. remove it.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      b5c84bf6
    • Nick Piggin's avatar
      fs: dcache scale subdirs · 2fd6b7f5
      Nick Piggin authored
      Protect d_subdirs and d_child with d_lock, except in filesystems that aren't
      using dcache_lock for these anyway (eg. using i_mutex).
      
      Note: if we change the locking rule in future so that ->d_child protection is
      provided only with ->d_parent->d_lock, it may allow us to reduce some locking.
      But it would be an exception to an otherwise regular locking scheme, so we'd
      have to see some good results. Probably not worthwhile.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      2fd6b7f5
    • Nick Piggin's avatar
      fs: dcache scale d_unhashed · da502956
      Nick Piggin authored
      Protect d_unhashed(dentry) condition with d_lock. This means keeping
      DCACHE_UNHASHED bit in synch with hash manipulations.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      da502956
    • Nick Piggin's avatar
      fs: change d_delete semantics · fe15ce44
      Nick Piggin authored
      Change d_delete from a dentry deletion notification to a dentry caching
      advise, more like ->drop_inode. Require it to be constant and idempotent,
      and not take d_lock. This is how all existing filesystems use the callback
      anyway.
      
      This makes fine grained dentry locking of dput and dentry lru scanning
      much simpler.
      Signed-off-by: default avatarNick Piggin <npiggin@kernel.dk>
      fe15ce44
  23. 29 Oct, 2010 1 commit
  24. 26 Oct, 2010 2 commits
  25. 10 Sep, 2010 2 commits
  26. 09 Aug, 2010 2 commits
    • Christoph Hellwig's avatar
      check ATTR_SIZE contraints in inode_change_ok · 2c27c65e
      Christoph Hellwig authored
      Make sure we check the truncate constraints early on in ->setattr by adding
      those checks to inode_change_ok.  Also clean up and document inode_change_ok
      to make this obvious.
      
      As a fallout we don't have to call inode_newsize_ok from simple_setsize and
      simplify it down to a truncate_setsize which doesn't return an error.  This
      simplifies a lot of setattr implementations and means we use truncate_setsize
      almost everywhere.  Get rid of fat_setsize now that it's trivial and mark
      ext2_setsize static to make the calling convention obvious.
      
      Keep the inode_newsize_ok in vmtruncate for now as all callers need an
      audit for its removal anyway.
      
      Note: setattr code in ecryptfs doesn't call inode_change_ok at all and
      needs a deeper audit, but that is left for later.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      2c27c65e
    • Christoph Hellwig's avatar
      default to simple_setattr · eef2380c
      Christoph Hellwig authored
      With the new truncate sequence every filesystem that wants to support file
      size changes on disk needs to implement its own ->setattr.  So instead
      of calling inode_setattr which supports size changes call into a simple
      method that doesn't support this.  simple_setattr is almost what we
      want except that it does not mark the inode dirty after changes.  Given
      that marking the inode dirty is a no-op for the simple in-memory filesystems
      that use simple_setattr currently just add the mark_inode_dirty call.
      
      Also add a WARN_ON for the presence of a truncate method to simple_setattr
      to catch new instances of it during the transition period.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      eef2380c