summaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2016-12-19 10:23:10 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2016-12-19 17:30:03 -0500
commit8ac2b42238f549241a4755de40fd161fba3de438 (patch)
treeb356af4962785529cba7a97c6e2a80f4c65a18c5 /fs/nfs/nfs4xdr.c
parentf07d4a31ccd7dbe3ca49bedc8298245d6877a43e (diff)
NFSv4: Retry the DELEGRETURN if the embedded GETATTR is rejected with EACCES
If our DELEGRETURN RPC call is rejected with an EACCES call, then we should remove the GETATTR call from the compound RPC and retry. This could potentially happen when there is a conflict between an ACL denying attribute reads and our use of SP4_MACH_CRED. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/nfs4xdr.c')
-rw-r--r--fs/nfs/nfs4xdr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 6f2365b99fb4..e9255cb453e6 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -2705,7 +2705,8 @@ static void nfs4_xdr_enc_delegreturn(struct rpc_rqst *req,
2705 encode_putfh(xdr, args->fhandle, &hdr); 2705 encode_putfh(xdr, args->fhandle, &hdr);
2706 if (args->lr_args) 2706 if (args->lr_args)
2707 encode_layoutreturn(xdr, args->lr_args, &hdr); 2707 encode_layoutreturn(xdr, args->lr_args, &hdr);
2708 encode_getfattr(xdr, args->bitmask, &hdr); 2708 if (args->bitmask)
2709 encode_getfattr(xdr, args->bitmask, &hdr);
2709 encode_delegreturn(xdr, args->stateid, &hdr); 2710 encode_delegreturn(xdr, args->stateid, &hdr);
2710 encode_nops(&hdr); 2711 encode_nops(&hdr);
2711} 2712}
@@ -6972,9 +6973,11 @@ static int nfs4_xdr_dec_delegreturn(struct rpc_rqst *rqstp,
6972 if (status) 6973 if (status)
6973 goto out; 6974 goto out;
6974 } 6975 }
6975 status = decode_getfattr(xdr, res->fattr, res->server); 6976 if (res->fattr) {
6976 if (status != 0) 6977 status = decode_getfattr(xdr, res->fattr, res->server);
6977 goto out; 6978 if (status != 0)
6979 goto out;
6980 }
6978 status = decode_delegreturn(xdr); 6981 status = decode_delegreturn(xdr);
6979out: 6982out:
6980 return status; 6983 return status;