From: Dmitry Eremin Date: Tue, 10 Jun 2014 17:46:55 +0000 (+0400) Subject: LU-4629 ldlm: fix uninitialized variable X-Git-Tag: 2.6.0-RC1~86 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=4a540ca0c37a5302c9696b2b626cbb61384c60be LU-4629 ldlm: fix uninitialized variable 'rc' might be used uninitialized in this function. ldlm_lib.c:1902: 'rc' is declared. ldlm_lib.c:1910: req->rq_export->exp_disconnected is false ldlm_lib.c:1951: 'rc' is used, but is uninitialized. Signed-off-by: Dmitry Eremin Change-Id: I0cea444d564f3806ed1d926ca5f4909f7005e240 Reviewed-on: http://review.whamcloud.com/10664 Reviewed-by: John L. Hammond Tested-by: Jenkins Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index c5067ad..c22eccb 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1896,12 +1896,10 @@ static struct ptlrpc_request *target_next_final_ping(struct obd_device *obd) return req; } -static int handle_recovery_req(struct ptlrpc_thread *thread, - struct ptlrpc_request *req, - svc_handler_t handler) +static void handle_recovery_req(struct ptlrpc_thread *thread, + struct ptlrpc_request *req, + svc_handler_t handler) { - int rc; - ENTRY; /** @@ -1909,7 +1907,7 @@ static int handle_recovery_req(struct ptlrpc_thread *thread, * it after that, discard such request silently */ if (req->rq_export->exp_disconnected) - GOTO(reqcopy_put, rc = 0); + RETURN_EXIT; req->rq_session.lc_thread = thread; req->rq_svc_thread = thread; @@ -1948,8 +1946,7 @@ static int handle_recovery_req(struct ptlrpc_thread *thread, } extend_recovery_timer(class_exp2obd(req->rq_export), to, true); } -reqcopy_put: - RETURN(rc); + EXIT; } static int target_recovery_thread(void *arg)