提交 3338c143 编写于 作者: T Trond Myklebust

NFS: Optimise attribute revalidation on close().

 Only force a getattr in nfs_file_flush() if the attribute
 cache is stale.
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 56ae19f3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册