diff options
author | Benny Halevy <bhalevy@panasas.com> | 2008-12-23 16:06:13 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 16:06:13 -0500 |
commit | aadf61521199e5c0b2976002213819cafa41b897 (patch) | |
tree | 65cf6521934b7aed16b0b832e45f85ec560100d5 /fs | |
parent | c977a2ef40a38c45537ad03823d0a004f06373f0 (diff) |
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: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4xdr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index d8ddfc5467d6..3f18a266a491 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -2222,6 +2222,8 @@ static int decode_compound_hdr(struct xdr_stream *xdr, struct compound_hdr *hdr) | |||
2222 | hdr->tag = (char *)p; | 2222 | hdr->tag = (char *)p; |
2223 | p += XDR_QUADLEN(hdr->taglen); | 2223 | p += XDR_QUADLEN(hdr->taglen); |
2224 | READ32(hdr->nops); | 2224 | READ32(hdr->nops); |
2225 | if (unlikely(hdr->nops < 1)) | ||
2226 | return nfs4_stat_to_errno(hdr->status); | ||
2225 | return 0; | 2227 | return 0; |
2226 | } | 2228 | } |
2227 | 2229 | ||