{
struct ptlrpc_service_part *svcpt;
struct ptlrpc_request_buffer_desc *rqbd;
- struct l_wait_info lwi;
+ int cnt;
int rc;
int i;
* the HUGE timeout lets us CWARN for visibility
* of sluggish LNDs
*/
- lwi = LWI_TIMEOUT_INTERVAL(
- LONG_UNLINK * HZ,
- HZ, NULL, NULL);
- rc = l_wait_event(svcpt->scp_waitq,
- svcpt->scp_nrqbds_posted == 0, &lwi);
- if (rc == -ETIMEDOUT) {
+ cnt = 0;
+ while (cnt < LONG_UNLINK &&
+ (rc = wait_event_idle_timeout(svcpt->scp_waitq,
+ svcpt->scp_nrqbds_posted == 0,
+ HZ)) == 0)
+ cnt ++;
+ if (rc == 0) {
CWARN("Service %s waiting for request buffers\n",
svcpt->scp_service->srv_name);
}