Message ID | 1432282245.25585.6.camel@haakon3.risingtidesystems.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index aa08d6b..a3c9121 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -641,9 +641,9 @@ int core_tpg_add_lun( target_attach_tg_pt_gp(lun, dev->t10_alua.default_tg_pt_gp); mutex_lock(&tpg->tpg_lun_mutex); - rcu_assign_pointer(lun->lun_se_dev, dev); spin_lock(&dev->se_port_lock); + rcu_assign_pointer(lun->lun_se_dev, dev); dev->export_count++; list_add_tail(&lun->lun_dev_link, &dev->dev_sep_list); spin_unlock(&dev->se_port_lock);