summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-10-27 18:25:04 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-12-01 17:21:37 -0500
commit3ecefc9295991eaaad4c67915c6384e5d18cc632 (patch)
tree7b0fbf0bd5058b772b5b80626eef357f7f31f950 /fs/nfs/nfs4xdr.c
parent3947b74d0f9d0738335d8b2bca2bde057f9141be (diff)
downloadlinux-3ecefc9295991eaaad4c67915c6384e5d18cc632.tar.bz2
NFSv4: Don't request close-to-open attribute when holding a delegation
If holding a delegation, we do not need to ask the server to return close-to-open cache consistency attributes as part of the CLOSE compound. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index c37473721230..b54931503872 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -2248,7 +2248,8 @@ static void nfs4_xdr_enc_close(struct rpc_rqst *req, struct xdr_stream *xdr,
encode_sequence(xdr, &args->seq_args, &hdr);
encode_putfh(xdr, args->fh, &hdr);
encode_close(xdr, args, &hdr);
- encode_getfattr(xdr, args->bitmask, &hdr);
+ if (args->bitmask != NULL)
+ encode_getfattr(xdr, args->bitmask, &hdr);
encode_nops(&hdr);
}