X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=sidebyside;f=lustre%2Fobdclass%2Fgenops.c;h=aca1fec8ec7bd287e56160135bec6292b2fef300;hb=0098396983e1075668414aa5298a4990e61ffbda;hp=1fa7197656bcc43aa072b7d1b141e7985d4934fd;hpb=1a9aafbf6317a9b8b026f69faad11e1801e1b92a;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 1fa7197..aca1fec 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -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); @@ -1267,7 +1267,7 @@ struct obd_import *class_new_import(struct obd_device *obd) init_waitqueue_head(&imp->imp_recovery_waitq); INIT_WORK(&imp->imp_zombie_work, obd_zombie_imp_cull); - if (curr_pid_ns->child_reaper) + if (curr_pid_ns && curr_pid_ns->child_reaper) imp->imp_sec_refpid = curr_pid_ns->child_reaper->pid; else imp->imp_sec_refpid = 1; @@ -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);