Whamcloud - gitweb
LU-8066 obd_type: discard obd_type_lock
[fs/lustre-release.git] / lustre / mgc / mgc_request.c
index 200720c..ff0b0c1 100644 (file)
@@ -118,7 +118,7 @@ int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id, int type)
 EXPORT_SYMBOL(mgc_logname2resid);
 
 /********************** config llog list **********************/
-static struct list_head config_llog_list = LIST_HEAD_INIT(config_llog_list);
+static LIST_HEAD(config_llog_list);
 static DEFINE_SPINLOCK(config_list_lock);      /* protects config_llog_list */
 
 /* Take a reference to a config log */
@@ -685,9 +685,7 @@ static int mgc_requeue_thread(void *data)
                config_log_put(cld_prev);
 
                /* Wait a bit to see if anyone else needs a requeue */
-               lwi = (struct l_wait_info) { 0 };
-               l_wait_event(rq_waitq, rq_state & (RQ_NOW | RQ_STOP),
-                            &lwi);
+               wait_event_idle(rq_waitq, rq_state & (RQ_NOW | RQ_STOP));
                spin_lock(&config_list_lock);
        }
 
@@ -930,7 +928,7 @@ static int mgc_cleanup(struct obd_device *obd)
 
         /* COMPAT_146 - old config logs may have added profiles we don't
            know about */
-        if (obd->obd_type->typ_refcnt <= 1)
+       if (atomic_read(&obd->obd_type->typ_refcnt) <= 1)
                 /* Only for the last mgc */
                 class_del_profiles();