/* NB everything can disappear under us once the request
* has been queued and we unlock, so do the wake now... */
- cfs_waitq_signal(&svcpt->scp_waitq);
+ wake_up(&svcpt->scp_waitq);
spin_unlock(&svcpt->scp_lock);
EXIT;
desc->bd_md_count--;
/* This is the last callback no matter what... */
if (desc->bd_md_count == 0)
- cfs_waitq_signal(&desc->bd_waitq);
+ wake_up(&desc->bd_waitq);
}
spin_unlock(&desc->bd_lock);
void ptlrpc_ni_fini(void)
{
- cfs_waitq_t waitq;
- struct l_wait_info lwi;
- int rc;
- int retries;
-
- /* Wait for the event queue to become idle since there may still be
- * messages in flight with pending events (i.e. the fire-and-forget
- * messages == client requests and "non-difficult" server
- * replies */
-
- for (retries = 0;; retries++) {
- rc = LNetEQFree(ptlrpc_eq_h);
- switch (rc) {
- default:
- LBUG();
-
- case 0:
- LNetNIFini();
- return;
-
- case -EBUSY:
- if (retries != 0)
- CWARN("Event queue still busy\n");
-
- /* Wait for a bit */
- cfs_waitq_init(&waitq);
- lwi = LWI_TIMEOUT(cfs_time_seconds(2), NULL, NULL);
- l_wait_event(waitq, 0, &lwi);
- break;
- }
- }
- /* notreached */
+ wait_queue_head_t waitq;
+ struct l_wait_info lwi;
+ int rc;
+ int retries;
+
+ /* Wait for the event queue to become idle since there may still be
+ * messages in flight with pending events (i.e. the fire-and-forget
+ * messages == client requests and "non-difficult" server
+ * replies */
+
+ for (retries = 0;; retries++) {
+ rc = LNetEQFree(ptlrpc_eq_h);
+ switch (rc) {
+ default:
+ LBUG();
+
+ case 0:
+ LNetNIFini();
+ return;
+
+ case -EBUSY:
+ if (retries != 0)
+ CWARN("Event queue still busy\n");
+
+ /* Wait for a bit */
+ init_waitqueue_head(&waitq);
+ lwi = LWI_TIMEOUT(cfs_time_seconds(2), NULL, NULL);
+ l_wait_event(waitq, 0, &lwi);
+ break;
+ }
+ }
+ /* notreached */
}
lnet_pid_t ptl_get_pid(void)