summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-28 04:12:41 +0200
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-10-28 04:12:41 +0200
commit3338c143b4fde2d256016b63043ec8e2c93eba19 (patch)
treebabfe2188e64ea0bb37c9838f5bcd3337c0c7504 /fs
parentNFSv4: Add directory post-op attributes to the CREATE operations. (diff)
downloadlinux-3338c143b4fde2d256016b63043ec8e2c93eba19.tar.xz
linux-3338c143b4fde2d256016b63043ec8e2c93eba19.zip
NFS: Optimise attribute revalidation on close().
Only force a getattr in nfs_file_flush() if the attribute cache is stale. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 572d8593486f..57d3e77d97ee 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -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;