Whamcloud - gitweb
LU-1346 libcfs: cleanup waitq related primitives
[fs/lustre-release.git] / lustre / mgc / mgc_request.c
index f2e3026..4ea58a0 100644 (file)
@@ -496,7 +496,7 @@ int lprocfs_mgc_rd_ir_state(char *page, char **start, off_t off,
 #define RQ_LATER   0x4
 #define RQ_STOP    0x8
 static int                    rq_state = 0;
-static cfs_waitq_t            rq_waitq;
+static wait_queue_head_t      rq_waitq;
 static DECLARE_COMPLETION(rq_exit);
 
 static void do_requeue(struct config_llog_data *cld)
@@ -645,7 +645,7 @@ static void mgc_requeue_add(struct config_llog_data *cld)
        } else {
                rq_state |= RQ_NOW;
                spin_unlock(&config_list_lock);
-               cfs_waitq_signal(&rq_waitq);
+               wake_up(&rq_waitq);
        }
        EXIT;
 }
@@ -855,7 +855,7 @@ static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
                                rq_state |= RQ_STOP;
                        spin_unlock(&config_list_lock);
                        if (running) {
-                               cfs_waitq_signal(&rq_waitq);
+                               wake_up(&rq_waitq);
                                wait_for_completion(&rq_exit);
                         }
                 }
@@ -910,7 +910,7 @@ static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
 
         if (cfs_atomic_inc_return(&mgc_count) == 1) {
                rq_state = 0;
-               cfs_waitq_init(&rq_waitq);
+               init_waitqueue_head(&rq_waitq);
 
                /* start requeue thread */
                rc = PTR_ERR(kthread_run(mgc_requeue_thread, NULL,
@@ -1100,7 +1100,7 @@ static void mgc_notify_active(struct obd_device *unused)
        spin_lock(&config_list_lock);
        rq_state |= RQ_NOW;
        spin_unlock(&config_list_lock);
-       cfs_waitq_signal(&rq_waitq);
+       wake_up(&rq_waitq);
 
        /* TODO: Help the MGS rebuild nidtbl. -jay */
 }