Commit aadf6152 authored by Benny Halevy's avatar Benny Halevy Committed by Trond Myklebust

nfs: return compound hdr.status when there are no op replies

When there are no op replies encoded in the compound reply
hdr.status still contains the overall status of the compound
rpc.  This can happen, e.g., when the server returns a
NFS4ERR_MINOR_VERS_MISMATCH error.
Signed-off-by: default avatarBenny Halevy <bhalevy@panasas.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent c977a2ef
...@@ -2222,6 +2222,8 @@ static int decode_compound_hdr(struct xdr_stream *xdr, struct compound_hdr *hdr) ...@@ -2222,6 +2222,8 @@ static int decode_compound_hdr(struct xdr_stream *xdr, struct compound_hdr *hdr)
hdr->tag = (char *)p; hdr->tag = (char *)p;
p += XDR_QUADLEN(hdr->taglen); p += XDR_QUADLEN(hdr->taglen);
READ32(hdr->nops); READ32(hdr->nops);
if (unlikely(hdr->nops < 1))
return nfs4_stat_to_errno(hdr->status);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment