1. 30 1月, 2008 2 次提交
  2. 27 11月, 2007 1 次提交
  3. 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
  4. 10 10月, 2007 20 次提交
  5. 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
  6. 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
  7. 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
  8. 11 7月, 2007 9 次提交
  9. 01 5月, 2007 1 次提交
  10. 17 3月, 2007 1 次提交
  11. 13 2月, 2007 1 次提交
  12. 04 2月, 2007 1 次提交
    • B
      NFS: move NFS_DEBUG definition · 4dc2eaec
      Benny Halevy 提交于
      Trond, looks like the changes to include/linux/nfs_fs.h in 2.6.18
      that moved the #include's of sunrpc header files into the #ifdef __KERNEL__ block
      disabled nfs debugging for all nfs c file not including any sunrpc header.
      
      The following patch moves the definition down, right before its use
      for defining ifdebug.
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      (Moved definition further down into the __KERNEL__ section: Trond)
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      4dc2eaec