Whamcloud - gitweb
LU-8066 obd_type: discard obd_type_lock
[fs/lustre-release.git] / lustre / mgc / mgc_request.c
index d6fb942..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 */
@@ -928,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();