summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-10-27 18:27:02 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-12-01 17:21:36 -0500
commit3947b74d0f9d0738335d8b2bca2bde057f9141be (patch)
tree9d585e3055c646735fd76af62bf0c8894daffc67 /fs/nfs/nfs4xdr.c
parent1cc1baf14b595bd44e83c2aca2fe487df7b6a1e3 (diff)
NFSv4: Don't request a GETATTR on open_downgrade.
If we're not closing the file completely, there is no need to request close-to-open attributes. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index fc89e5ed07ee..c37473721230 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -499,14 +499,12 @@ static int nfs4_stat_to_errno(int);
499 (compound_encode_hdr_maxsz + \ 499 (compound_encode_hdr_maxsz + \
500 encode_sequence_maxsz + \ 500 encode_sequence_maxsz + \
501 encode_putfh_maxsz + \ 501 encode_putfh_maxsz + \
502 encode_open_downgrade_maxsz + \ 502 encode_open_downgrade_maxsz)
503 encode_getattr_maxsz)
504#define NFS4_dec_open_downgrade_sz \ 503#define NFS4_dec_open_downgrade_sz \
505 (compound_decode_hdr_maxsz + \ 504 (compound_decode_hdr_maxsz + \
506 decode_sequence_maxsz + \ 505 decode_sequence_maxsz + \
507 decode_putfh_maxsz + \ 506 decode_putfh_maxsz + \
508 decode_open_downgrade_maxsz + \ 507 decode_open_downgrade_maxsz)
509 decode_getattr_maxsz)
510#define NFS4_enc_close_sz (compound_encode_hdr_maxsz + \ 508#define NFS4_enc_close_sz (compound_encode_hdr_maxsz + \
511 encode_sequence_maxsz + \ 509 encode_sequence_maxsz + \
512 encode_putfh_maxsz + \ 510 encode_putfh_maxsz + \
@@ -2328,7 +2326,6 @@ static void nfs4_xdr_enc_open_downgrade(struct rpc_rqst *req,
2328 encode_sequence(xdr, &args->seq_args, &hdr); 2326 encode_sequence(xdr, &args->seq_args, &hdr);
2329 encode_putfh(xdr, args->fh, &hdr); 2327 encode_putfh(xdr, args->fh, &hdr);
2330 encode_open_downgrade(xdr, args, &hdr); 2328 encode_open_downgrade(xdr, args, &hdr);
2331 encode_getfattr(xdr, args->bitmask, &hdr);
2332 encode_nops(&hdr); 2329 encode_nops(&hdr);
2333} 2330}
2334 2331
@@ -6115,9 +6112,6 @@ static int nfs4_xdr_dec_open_downgrade(struct rpc_rqst *rqstp,
6115 if (status) 6112 if (status)
6116 goto out; 6113 goto out;
6117 status = decode_open_downgrade(xdr, res); 6114 status = decode_open_downgrade(xdr, res);
6118 if (status != 0)
6119 goto out;
6120 decode_getfattr(xdr, res->fattr, res->server);
6121out: 6115out:
6122 return status; 6116 return status;
6123} 6117}