Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58ff4184 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Don't revalidate the file on close if we hold a delegation



If we're holding a delegation, we can skip sending the close-to-open
GETATTR until we're returning that delegation.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 0bc2c9b4
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -795,6 +795,8 @@ void nfs_close_context(struct nfs_open_context *ctx, int is_sync)
	if (!is_sync)
	if (!is_sync)
		return;
		return;
	inode = d_inode(ctx->dentry);
	inode = d_inode(ctx->dentry);
	if (NFS_PROTO(inode)->have_delegation(inode, FMODE_READ))
		return;
	nfsi = NFS_I(inode);
	nfsi = NFS_I(inode);
	if (inode->i_mapping->nrpages == 0)
	if (inode->i_mapping->nrpages == 0)
		return;
		return;