1. 15 10月, 2008 1 次提交
    • T
      NFS: Fix the resolution problem with nfs_inode_attrs_need_update() · 4704f0e2
      Trond Myklebust 提交于
      It appears that 'jiffies' timestamps do not have high enough resolution for
      nfs_inode_attrs_need_update(). One problem is that a GETATTR can be
      launched within < 1 jiffy of the last operation that updated the attribute.
      Another problem is that RPC calls can take < 1 jiffy to execute.
      
      We can fix this by switching the variables to use a simple global counter
      that gets incremented every time we start another GETATTR call.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4704f0e2
  2. 08 10月, 2008 1 次提交
  3. 27 7月, 2008 2 次提交
    • A
      [PATCH] get rid of indirect users of namei.h · 3f8206d4
      Al Viro 提交于
      fs.h needs path.h, not namei.h; nfs_fs.h doesn't need it at all.
      Several places in the tree needed direct include.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      3f8206d4
    • A
      [PATCH] sanitize ->permission() prototype · e6305c43
      Al Viro 提交于
      * kill nameidata * argument; map the 3 bits in ->flags anybody cares
        about to new MAY_... ones and pass with the mask.
      * kill redundant gfs2_iop_permission()
      * sanitize ecryptfs_permission()
      * fix remaining places where ->permission() instances might barf on new
        MAY_... found in mask.
      
      The obvious next target in that direction is permission(9)
      
      folded fix for nfs_permission() breakage from Miklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      e6305c43
  4. 10 7月, 2008 2 次提交
  5. 20 4月, 2008 2 次提交
  6. 08 3月, 2008 1 次提交
  7. 30 1月, 2008 3 次提交
  8. 07 12月, 2007 1 次提交
  9. 27 11月, 2007 1 次提交
  10. 20 10月, 2007 1 次提交
    • T
      NFS: Fix a race in sillyrename · 565277f6
      Trond Myklebust 提交于
      lookup() and sillyrename() can race one another because the sillyrename()
      completion cannot take the parent directory's inode->i_mutex since the
      latter may be held by whoever is calling dput().
      
      We therefore have little option but to add extra locking to ensure that
      nfs_lookup() and nfs_atomic_open() do not race with the sillyrename
      completion.
      If somebody has looked up the sillyrenamed file in the meantime, we just
      transfer the sillydelete information to the new dentry.
      
      Please refer to the bug-report at
      	http://bugzilla.linux-nfs.org/show_bug.cgi?id=150Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      565277f6
  11. 10 10月, 2007 20 次提交
  12. 01 9月, 2007 1 次提交
    • T
      NFS: Fix a write request leak in nfs_invalidate_page() · 1b3b4a1a
      Trond Myklebust 提交于
      Ryusuke Konishi says:
      
      The recent truncate_complete_page() clears the dirty flag from a page
      before calling a_ops->invalidatepage(),
      ^^^^^^
      static void
      truncate_complete_page(struct address_space *mapping, struct page *page)
      {
              ...
              cancel_dirty_page(page, PAGE_CACHE_SIZE);  <--- Inserted here at
      kernel 2.6.20
      
              if (PagePrivate(page))
                      do_invalidatepage(page, 0);   ---> will call
      a_ops->invalidatepage()
              ...
      }
      
      and this is disturbing nfs_wb_page_priority() from calling 
      nfs_writepage_locked() that is expected to handle the pending
      request (=nfs_page) associated with the page.
      
      int nfs_wb_page_priority(struct inode *inode, struct page *page, int how)
      {
              ...
              if (clear_page_dirty_for_io(page)) {
                      ret = nfs_writepage_locked(page, &wbc);
                      if (ret < 0)
                              goto out;
              }
              ...
      }
      
      Since truncate_complete_page() will get rid of the page after
      a_ops->invalidatepage() returns, the request (=nfs_page) associated
      with the page becomes a garbage in nfs_inode->nfs_page_tree.
      ------------------------
      
      Fix this by ensuring that nfs_wb_page_priority() recognises that it may
      also need to clear out non-dirty pages that have an nfs_page associated
      with them.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      1b3b4a1a
  13. 08 8月, 2007 1 次提交
    • T
      NFS: Fix put_nfs_open_context · 5e11934d
      Trond Myklebust 提交于
      We need to grab the inode->i_lock atomically with the last reference put in
      order to remove the open context that is being freed from the
      nfsi->open_files list.
      
      Fix by converting the kref to a standard atomic counter and then using
      atomic_dec_and_lock()...
      
      Thanks to Arnd Bergmann for pointing out the problem.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      5e11934d
  14. 20 7月, 2007 1 次提交
    • T
      SUNRPC: Clean up the sillyrename code · e4eff1a6
      Trond Myklebust 提交于
      Fix a couple of bugs:
       - Don't rely on the parent dentry still being valid when the call completes.
         Fixes a race with shrink_dcache_for_umount_subtree()
      
       - Don't remove the file if the filehandle has been labelled as stale.
      
      Fix a couple of inefficiencies
       - Remove the global list of sillyrenamed files. Instead we can cache the
         sillyrename information in the dentry->d_fsdata
       - Move common code from unlink_setup/unlink_done into fs/nfs/unlink.c
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      e4eff1a6
  15. 11 7月, 2007 2 次提交