diff options
-rw-r--r-- | fs/nfs/nfs4proc.c | 8 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 11 |
2 files changed, 15 insertions, 4 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 4b66b0c469cd..6dcbc5defb7a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -5695,6 +5695,14 @@ static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata) | |||
5695 | case -NFS4ERR_STALE_STATEID: | 5695 | case -NFS4ERR_STALE_STATEID: |
5696 | task->tk_status = 0; | 5696 | task->tk_status = 0; |
5697 | break; | 5697 | break; |
5698 | case -NFS4ERR_ACCESS: | ||
5699 | if (data->args.bitmask) { | ||
5700 | data->args.bitmask = NULL; | ||
5701 | data->res.fattr = NULL; | ||
5702 | task->tk_status = 0; | ||
5703 | rpc_restart_call_prepare(task); | ||
5704 | return; | ||
5705 | } | ||
5698 | default: | 5706 | default: |
5699 | if (nfs4_async_handle_error(task, data->res.server, | 5707 | if (nfs4_async_handle_error(task, data->res.server, |
5700 | NULL, NULL) == -EAGAIN) { | 5708 | NULL, NULL) == -EAGAIN) { |
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); |
6979 | out: | 6982 | out: |
6980 | return status; | 6983 | return status; |