X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fptlrpc%2Fptlrpcd.c;h=914f3261b09e7ad33cb239b18cbb829720fe8c1d;hp=9810009f35318d6649329cf966625bc1f27f1406;hb=4e5855ae4dea7954ce1891cd23abce033fe23f03;hpb=ca6c35cab141597809c6f3a58102fac8ac86104a diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c index 9810009..914f326 100644 --- a/lustre/ptlrpc/ptlrpcd.c +++ b/lustre/ptlrpc/ptlrpcd.c @@ -486,16 +486,20 @@ static int ptlrpcd(void *arg) * new_req_list and ptlrpcd_check() moves them into the set. */ do { - struct l_wait_info lwi; time64_t timeout; timeout = ptlrpc_set_next_timeout(set); - lwi = LWI_TIMEOUT(cfs_time_seconds(timeout), - ptlrpc_expired_set, set); lu_context_enter(&env.le_ctx); lu_context_enter(env.le_ses); - l_wait_event(set->set_waitq, ptlrpcd_check(&env, pc), &lwi); + if (timeout == 0) + wait_event_idle(set->set_waitq, + ptlrpcd_check(&env, pc)); + else if (wait_event_idle_timeout(set->set_waitq, + ptlrpcd_check(&env, pc), + cfs_time_seconds(timeout)) + == 0) + ptlrpc_expired_set(set); lu_context_exit(&env.le_ctx); lu_context_exit(env.le_ses);