From: Oleg Drokin Date: Fri, 23 Oct 2020 06:56:04 +0000 (-0400) Subject: LU-14069 ldlm: Fix unbounded OBD_FAIL_LDLM_CANCEL_BL_CB_RACE wait X-Git-Tag: 2.12.6-RC1~15 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5026a42944c2219d2a5d8f2692670dcc2727eda2;p=fs%2Flustre-release.git LU-14069 ldlm: Fix unbounded OBD_FAIL_LDLM_CANCEL_BL_CB_RACE wait in ldlm_handle_cp_callback the while loop is clearly supposed to be limited by the "to" value of 1 second, but is not. Seems to have been broken by all the Solaris porting in HEAD all the way back in 2008. Restore the to assignment to make it not hang indefinitely. Lustre-change: https://review.whamcloud.com/#/c/40375/ Lusre-commit: 5da99051e58b9e9079b66a275d6c47e1e109eee5 Change-Id: I449bfd7f585ab7db475fb3fd4cbbd876126ff789 Fixes: adde80ffef ("Land b_head_libcfs onto HEAD") Signed-off-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/40411 Tested-by: jenkins Reviewed-by: Andreas Dilger Tested-by: Maloo --- diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 81ef680..bb45f4f 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -1825,7 +1825,7 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req, while (to > 0) { set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(to); + to = schedule_timeout(to); if (ldlm_is_granted(lock) || ldlm_is_destroyed(lock)) break;