From: Li Wei Date: Mon, 11 Mar 2013 07:18:49 +0000 (+0800) Subject: LU-2942 ptlrpc: Fix an unswabbed status check in after_reply() X-Git-Tag: 2.3.63~73 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=94dc17a687b601c4f1a3809a19f835385cca4a51 LU-2942 ptlrpc: Fix an unswabbed status check in after_reply() The -EINPROGRESS handling in after_reply() checks reply status while pb_status still contains unswabbed data. This patch moves the block below the unpack_reply() call. Change-Id: I619b26d213708b8f5c250cdf085f359bba31ffae Signed-off-by: Li Wei Reviewed-on: http://review.whamcloud.com/5667 Tested-by: Hudson Reviewed-by: Niu Yawei Reviewed-by: Johann Lombardi Tested-by: Maloo --- diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index 4dea902..eddd66b 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -1223,6 +1223,16 @@ static int after_reply(struct ptlrpc_request *req) RETURN(rc); } + /* + * Security layer unwrap might ask resend this request. + */ + if (req->rq_resend) + RETURN(0); + + rc = unpack_reply(req); + if (rc) + RETURN(rc); + /* retry indefinitely on EINPROGRESS */ if (lustre_msg_get_status(req->rq_repmsg) == -EINPROGRESS && ptlrpc_no_resend(req) == 0 && !req->rq_no_retry_einprogress) { @@ -1251,17 +1261,9 @@ static int after_reply(struct ptlrpc_request *req) req->rq_sent = now + req->rq_timeout; else req->rq_sent = now + req->rq_nr_resend; - } - /* - * Security layer unwrap might ask resend this request. - */ - if (req->rq_resend) - RETURN(0); - - rc = unpack_reply(req); - if (rc) - RETURN(rc); + RETURN(0); + } cfs_gettimeofday(&work_start); timediff = cfs_timeval_sub(&work_start, &req->rq_arrival_time, NULL);