From: andros@netapp.com
To: trond.myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, Andy Adamson <andros@netapp.com>
Subject: [PATCH 2/7] nfs41: directly encode back channel error
Date: Thu, 14 Jan 2010 17:45:05 -0500 [thread overview]
Message-ID: <1263509110-3097-3-git-send-email-andros@netapp.com> (raw)
In-Reply-To: <1263509110-3097-2-git-send-email-andros@netapp.com>
From: Andy Adamson <andros@netapp.com>
Skip all other processing when error is encountered.
Signed-off-by: Andy Adamson <andros@netapp.com>
---
fs/nfs/callback_xdr.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index 6ae3278..d3e07f4 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;
--
1.6.5.2
next prev parent reply other threads:[~2010-01-14 22:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-14 22:45 [PATCH 0/7] nfs41: return correct errors on callback replays version 3 andros
2010-01-14 22:45 ` [PATCH 1/7] nfs41: fix wrong error on callback header xdr overflow andros
2010-01-14 22:45 ` andros [this message]
2010-01-14 22:45 ` [PATCH 3/7] nfs41: remove uneeded checks in callback processing andros
2010-01-14 22:45 ` [PATCH 4/7] nfs41: prepare for back channel drc andros
2010-01-14 22:45 ` [PATCH 5/7] nfs41: back channel drc minimal implementation andros
2010-01-14 22:45 ` [PATCH 6/7] nfs41: implement cb_recall_slot andros
2010-01-14 22:45 ` [PATCH 7/7] nfs41: resize slot table in reset andros
2010-01-20 20:38 ` [PATCH 6/7] nfs41: implement cb_recall_slot Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1263509110-3097-3-git-send-email-andros@netapp.com \
--to=andros@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox