NFSv4: Ensure that we wait for the CLOSE request to complete
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 18 Oct 2007 22:03:27 +0000 (18:03 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 19 Oct 2007 21:19:25 +0000 (17:19 -0400)
Otherwise, we do end up breaking close-to-open semantics. We also end up
breaking some of the silly-rename tests in Connectathon on some setups.

Please refer to the bug-report at
http://bugzilla.linux-nfs.org/show_bug.cgi?id=150

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/file.c
fs/nfs/inode.c
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c

index d29f90d..b3bb89f 100644 (file)
@@ -131,7 +131,7 @@ nfs_file_release(struct inode *inode, struct file *filp)
 {
        /* Ensure that dirty pages are flushed out with the right creds */
        if (filp->f_mode & FMODE_WRITE)
-               filemap_fdatawrite(filp->f_mapping);
+               nfs_wb_all(filp->f_path.dentry->d_inode);
        nfs_inc_stats(inode, NFSIOS_VFSRELEASE);
        return NFS_PROTO(inode)->file_release(inode, filp);
 }
diff --cc fs/nfs/inode.c
Simple merge
Simple merge
Simple merge
Simple merge