[PATCH] nfs: return compound hdr.status when there are no op replies
Benny Halevy
bhalevy at panasas.com
Mon Jul 21 12:59:36 EDT 2008
When there are no op replies encoded in the comound reply
hdr.status still contains the overall status of the compound
rpc. This can happen, e.g., when the server returns an
NFS4ERR_MINOR_VERS_MISMATCH error.
Signed-off-by: Benny Halevy <bhalevy at panasas.com>
---
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 b916297..ac2386b 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)
hdr->tag = (char *)p;
p += XDR_QUADLEN(hdr->taglen);
READ32(hdr->nops);
+ if (unlikely(hdr->nops < 1))
+ return nfs4_stat_to_errno(hdr->status);
return 0;
}
--
1.5.6.4
More information about the NFSv4
mailing list