瀏覽代碼

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>
Trond Myklebust 19 年之前
父節點
當前提交
3338c143b4
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      fs/nfs/file.c

+ 2 - 2
fs/nfs/file.c

@@ -205,8 +205,8 @@ nfs_file_flush(struct file *file)
 	if (!status) {
 	if (!status) {
 		status = ctx->error;
 		status = ctx->error;
 		ctx->error = 0;
 		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();
 	unlock_kernel();
 	return status;
 	return status;