summaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_xdr.c
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2010-01-14 23:45:05 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-02-10 14:30:56 +0100
commitb92b30190093377828efcde5fc4cf7598fa1ee46 (patch)
treead13e599621c7e2c1d908738370ae827a393a98b /fs/nfs/callback_xdr.c
parentnfs41: fix wrong error on callback header xdr overflow (diff)
downloadlinux-b92b30190093377828efcde5fc4cf7598fa1ee46.tar.xz
linux-b92b30190093377828efcde5fc4cf7598fa1ee46.zip
nfs41: directly encode back channel error
Skip all other processing when error is encountered. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/callback_xdr.c')
-rw-r--r--fs/nfs/callback_xdr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 6ae327871b86..d3e07f469949 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -625,16 +625,19 @@ static __be32 process_op(uint32_t minorversion, int nop,
preprocess_nfs4_op(op_nr, &op);
if (status == htonl(NFS4ERR_OP_ILLEGAL))
op_nr = OP_CB_ILLEGAL;
+ if (status)
+ goto encode_hdr;
maxlen = xdr_out->end - xdr_out->p;
if (maxlen > 0 && maxlen < PAGE_SIZE) {
- if (likely(status == 0 && op->decode_args != NULL))
+ if (likely(op->decode_args != NULL))
status = op->decode_args(rqstp, xdr_in, argp);
if (likely(status == 0 && op->process_op != NULL))
status = op->process_op(argp, resp);
} else
status = htonl(NFS4ERR_RESOURCE);
+encode_hdr:
res = encode_op_hdr(xdr_out, op_nr, status);
if (unlikely(res))
return res;