NFS: Optimise attribute revalidation on close().
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 28 Oct 2005 02:12:41 +0000 (22:12 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 28 Oct 2005 02:12:41 +0000 (22:12 -0400)
 Only force a getattr in nfs_file_flush() if the attribute
 cache is stale.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/file.c

index 572d8593486fa557d0a668123201b300a10acc6b..57d3e77d97ee1eb2e9c291695078d8b06f902d24 100644 (file)
@@ -205,8 +205,8 @@ nfs_file_flush(struct file *file)
        if (!status) {
                status = ctx->error;
                ctx->error = 0;
-               if (!status && !nfs_have_delegation(inode, FMODE_READ))
-                       __nfs_revalidate_inode(NFS_SERVER(inode), inode);
+               if (!status)
+                       nfs_revalidate_inode(NFS_SERVER(inode), inode);
        }
        unlock_kernel();
        return status;