From: Andriy Skulysh Date: Mon, 19 Sep 2016 10:25:47 +0000 (+0300) Subject: LU-8624 osc: hung in osc_destroy() X-Git-Tag: 2.9.55~60 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=2895e8a53a8d25d9548d6fcf47af480db4c4b1d7 LU-8624 osc: hung in osc_destroy() cl_destroy_in_flight becomes < 0 because the osc_can_send_destroy() won't increment cl_destroy_in_flight if l_wait_event() gets interrupted by a signal, but the request will still be sent and the request's interpret function will decrease the counter. Don't send OST_DESTROY request on signal and return -EINTR. Seagate-bug-id: MRP-3834 Change-Id: Ie725e501909095b8cd853287b9a43feb1f89ddb5 Signed-off-by: Andriy Skulysh Reviewed-on: https://review.whamcloud.com/22588 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin --- diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index a92a1356..9f541e5 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -647,8 +647,12 @@ static int osc_destroy(const struct lu_env *env, struct obd_export *exp, * Wait until the number of on-going destroy RPCs drops * under max_rpc_in_flight */ - l_wait_event_exclusive(cli->cl_destroy_waitq, - osc_can_send_destroy(cli), &lwi); + rc = l_wait_event_exclusive(cli->cl_destroy_waitq, + osc_can_send_destroy(cli), &lwi); + if (rc) { + ptlrpc_request_free(req); + RETURN(rc); + } } /* Do not wait for response */