Skip to content

Commit

Permalink
NFS: Optimise attribute revalidation on close().
Browse files Browse the repository at this point in the history
 Only force a getattr in nfs_file_flush() if the attribute
 cache is stale.

 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Oct 28, 2005
1 parent 56ae19f commit 3338c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3338c14

Please sign in to comment.