Whamcloud - gitweb
LU-9679 lustre: use LIST_HEAD() for local lists.
[fs/lustre-release.git] / lustre / obdclass / genops.c
index d472ba3..aca1fec 100644 (file)
@@ -1056,7 +1056,7 @@ struct obd_export *__class_new_export(struct obd_device *obd,
        spin_lock_init(&export->exp_uncommitted_replies_lock);
        INIT_LIST_HEAD(&export->exp_uncommitted_replies);
        INIT_LIST_HEAD(&export->exp_req_replay_queue);
-       INIT_LIST_HEAD_RCU(&export->exp_handle.h_link);
+       INIT_HLIST_NODE(&export->exp_handle.h_link);
        INIT_LIST_HEAD(&export->exp_hp_rpcs);
        INIT_LIST_HEAD(&export->exp_reg_rpcs);
        class_handle_hash(&export->exp_handle, export_handle_owner);
@@ -1520,11 +1520,10 @@ static void class_disconnect_export_list(struct list_head *list,
 
 void class_disconnect_exports(struct obd_device *obd)
 {
-       struct list_head work_list;
+       LIST_HEAD(work_list);
        ENTRY;
 
        /* Move all of the exports from obd_exports to a work list, en masse. */
-       INIT_LIST_HEAD(&work_list);
        spin_lock(&obd->obd_dev_lock);
        list_splice_init(&obd->obd_exports, &work_list);
        list_splice_init(&obd->obd_delayed_exports, &work_list);
@@ -1547,12 +1546,11 @@ EXPORT_SYMBOL(class_disconnect_exports);
 void class_disconnect_stale_exports(struct obd_device *obd,
                                     int (*test_export)(struct obd_export *))
 {
-       struct list_head work_list;
+       LIST_HEAD(work_list);
        struct obd_export *exp, *n;
-        int evicted = 0;
-        ENTRY;
+       int evicted = 0;
+       ENTRY;
 
-       INIT_LIST_HEAD(&work_list);
        spin_lock(&obd->obd_dev_lock);
        list_for_each_entry_safe(exp, n, &obd->obd_exports,
                                 exp_obd_chain) {
@@ -2279,8 +2277,8 @@ __u16 obd_get_mod_rpc_slot(struct client_obd *cli, __u32 opc)
                        spin_unlock(&cli->cl_mod_rpcs_lock);
                        /* tag 0 is reserved for non-modify RPCs */
 
-                       CDEBUG(D_RPCTRACE, "%s: modify RPC slot %u is allocated"
-                              "opc %u, max %hu\n",
+                       CDEBUG(D_RPCTRACE,
+                              "%s: modify RPC slot %u is allocated opc %u, max %hu\n",
                               cli->cl_import->imp_obd->obd_name,
                               i + 1, opc, max);