diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2018-03-20 17:03:11 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2018-04-10 16:06:22 -0400 |
commit | 8bcbe7d98cffb60efdea40e36171c58dcc2bdd31 (patch) | |
tree | f5e49f26ba772df80645af54e8139636d4caa857 /fs/nfs/nfs4xdr.c | |
parent | 36b3743fef88616f92b49949fe1022f345970258 (diff) |
NFSv4: Don't ask for attributes when ACCESS is protected by a delegation
If we hold a delegation, then the results of the ACCESS call are protected
anyway.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 79f1774b9d68..51264f5d9d2a 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -2102,7 +2102,8 @@ static void nfs4_xdr_enc_access(struct rpc_rqst *req, struct xdr_stream *xdr, | |||
2102 | encode_sequence(xdr, &args->seq_args, &hdr); | 2102 | encode_sequence(xdr, &args->seq_args, &hdr); |
2103 | encode_putfh(xdr, args->fh, &hdr); | 2103 | encode_putfh(xdr, args->fh, &hdr); |
2104 | encode_access(xdr, args->access, &hdr); | 2104 | encode_access(xdr, args->access, &hdr); |
2105 | encode_getfattr(xdr, args->bitmask, &hdr); | 2105 | if (args->bitmask) |
2106 | encode_getfattr(xdr, args->bitmask, &hdr); | ||
2106 | encode_nops(&hdr); | 2107 | encode_nops(&hdr); |
2107 | } | 2108 | } |
2108 | 2109 | ||
@@ -6236,7 +6237,8 @@ static int nfs4_xdr_dec_access(struct rpc_rqst *rqstp, struct xdr_stream *xdr, | |||
6236 | status = decode_access(xdr, &res->supported, &res->access); | 6237 | status = decode_access(xdr, &res->supported, &res->access); |
6237 | if (status != 0) | 6238 | if (status != 0) |
6238 | goto out; | 6239 | goto out; |
6239 | decode_getfattr(xdr, res->fattr, res->server); | 6240 | if (res->fattr) |
6241 | decode_getfattr(xdr, res->fattr, res->server); | ||
6240 | out: | 6242 | out: |
6241 | return status; | 6243 | return status; |
6242 | } | 6244 | } |