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);
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;
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);
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) {
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);