diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-16 23:39:58 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-12-19 23:29:32 +0100 |
commit | 58ff41842c7b8b8a79752e3d040188ebddb95194 (patch) | |
tree | 5c19ed36f6df9d051867ba19ec90ca790335f4c2 /fs/nfs/inode.c | |
parent | NFSv4: Don't discard the attributes returned by asynchronous DELEGRETURN (diff) | |
download | linux-58ff41842c7b8b8a79752e3d040188ebddb95194.tar.xz linux-58ff41842c7b8b8a79752e3d040188ebddb95194.zip |
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: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 7de345fd8e1e..2fc237cd338e 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -795,6 +795,8 @@ void nfs_close_context(struct nfs_open_context *ctx, int is_sync) if (!is_sync) return; inode = d_inode(ctx->dentry); + if (NFS_PROTO(inode)->have_delegation(inode, FMODE_READ)) + return; nfsi = NFS_I(inode); if (inode->i_mapping->nrpages == 0) return; |