1. 26 1月, 2015 1 次提交
    • A
      ncpfs: get rid of d_validate() nonsense · 5e993e25
      Al Viro 提交于
      What we want is to have non-counting references to children in
      pagecache of parent directory, and avoid picking them after a child
      has been freed.  Fine, so let's just have ->d_prune() clear
      parent's inode "has directory contents in page cache" flag.
      That way we don't need ->d_fsdata for storing offsets, so we can
      use it as a quick and dirty "is it referenced from page cache"
      flag.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      5e993e25
  2. 20 11月, 2014 1 次提交
  3. 04 11月, 2014 1 次提交
  4. 01 11月, 2014 1 次提交
  5. 14 10月, 2014 1 次提交
  6. 09 10月, 2014 1 次提交
  7. 09 4月, 2014 3 次提交
  8. 25 10月, 2013 1 次提交
  9. 29 6月, 2013 4 次提交
  10. 08 6月, 2013 1 次提交
  11. 26 2月, 2013 1 次提交
  12. 14 7月, 2012 3 次提交
  13. 04 1月, 2012 4 次提交
  14. 28 5月, 2011 2 次提交
  15. 26 5月, 2011 2 次提交
  16. 13 1月, 2011 2 次提交
  17. 07 1月, 2011 9 次提交
    • N
      fs: rcu-walk aware d_revalidate method · 34286d66
      Nick Piggin 提交于
      Require filesystems be aware of .d_revalidate being called in rcu-walk
      mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning
      -ECHILD from all implementations.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      34286d66
    • N
      fs: dcache reduce branches in lookup path · fb045adb
      Nick Piggin 提交于
      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: NNick Piggin <npiggin@kernel.dk>
      fb045adb
    • N
      fs: dcache rationalise dget variants · dc0474be
      Nick Piggin 提交于
      dget_locked was a shortcut to avoid the lazy lru manipulation when we already
      held dcache_lock (lru manipulation was relatively cheap at that point).
      However, how that the lru lock is an innermost one, we never hold it at any
      caller, so the lock cost can now be avoided. We already have well working lazy
      dcache LRU, so it should be fine to defer LRU manipulations to scan time.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      dc0474be
    • N
      fs: dcache remove dcache_lock · b5c84bf6
      Nick Piggin 提交于
      dcache_lock no longer protects anything. remove it.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b5c84bf6
    • N
      fs: dcache scale subdirs · 2fd6b7f5
      Nick Piggin 提交于
      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: NNick Piggin <npiggin@kernel.dk>
      2fd6b7f5
    • N
      fs: change d_hash for rcu-walk · b1e6a015
      Nick Piggin 提交于
      Change d_hash so it may be called from lock-free RCU lookups. See similar
      patch for d_compare for details.
      
      For in-tree filesystems, this is just a mechanical change.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      b1e6a015
    • N
      fs: change d_compare for rcu-walk · 621e155a
      Nick Piggin 提交于
      Change d_compare so it may be called from lock-free RCU lookups. This
      does put significant restrictions on what may be done from the callback,
      however there don't seem to have been any problems with in-tree fses.
      If some strange use case pops up that _really_ cannot cope with the
      rcu-walk rules, we can just add new rcu-unaware callbacks, which would
      cause name lookup to drop out of rcu-walk mode.
      
      For in-tree filesystems, this is just a mechanical change.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      621e155a
    • N
      fs: name case update method · fb2d5b86
      Nick Piggin 提交于
      smpfs and ncpfs want to update a live dentry name in-place. Rather than
      have them open code the locking, provide a documented dcache API.
      Signed-off-by: NNick Piggin <npiggin@kernel.dk>
      fb2d5b86
    • N
      fs: change d_delete semantics · fe15ce44
      Nick Piggin 提交于
      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: NNick Piggin <npiggin@kernel.dk>
      fe15ce44
  18. 18 11月, 2010 1 次提交
  19. 05 10月, 2010 1 次提交
    • P
      BKL: Remove BKL from ncpfs · 2e54eb96
      Petr Vandrovec 提交于
      Dozen of changes in ncpfs to provide some locking other than BKL.
      
      In readdir cache unlock and mark complete first page as last operation,
      so it can be used for synchronization, as code intended.
      
      When updating dentry name on case insensitive filesystems do at least
      some basic locking...
      
      Hold i_mutex when updating inode fields.
      
      Push some ncp_conn_is_valid down to ncp_request.  Connection can become
      invalid at any moment, and fewer error code paths to test the better.
      
      Use i_size_{read,write} to modify file size.
      
      Set inode's backing_dev_info as ncpfs has its own special bdi.
      
      In ioctl unbreak ioctls invoked on filesystem mounted 'ro' - tests are
      for inode writeable or owner match, but were turned to filesystem
      writeable and inode writeable or owner match.  Also collect all permission
      checks in single place.
      
      Add some locking, and remove comments saying that it would be cool to
      add some locks to the code.
      
      Constify some pointers.
      Signed-off-by: NPetr Vandrovec <petr@vandrovec.name>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      2e54eb96