|
@@ -642,6 +642,8 @@ void core_tpg_remove_lun(
|
|
*/
|
|
*/
|
|
struct se_device *dev = rcu_dereference_raw(lun->lun_se_dev);
|
|
struct se_device *dev = rcu_dereference_raw(lun->lun_se_dev);
|
|
|
|
|
|
|
|
+ lun->lun_shutdown = true;
|
|
|
|
+
|
|
core_clear_lun_from_tpg(lun, tpg);
|
|
core_clear_lun_from_tpg(lun, tpg);
|
|
/*
|
|
/*
|
|
* Wait for any active I/O references to percpu se_lun->lun_ref to
|
|
* Wait for any active I/O references to percpu se_lun->lun_ref to
|
|
@@ -663,6 +665,8 @@ void core_tpg_remove_lun(
|
|
}
|
|
}
|
|
if (!(dev->se_hba->hba_flags & HBA_FLAGS_INTERNAL_USE))
|
|
if (!(dev->se_hba->hba_flags & HBA_FLAGS_INTERNAL_USE))
|
|
hlist_del_rcu(&lun->link);
|
|
hlist_del_rcu(&lun->link);
|
|
|
|
+
|
|
|
|
+ lun->lun_shutdown = false;
|
|
mutex_unlock(&tpg->tpg_lun_mutex);
|
|
mutex_unlock(&tpg->tpg_lun_mutex);
|
|
|
|
|
|
percpu_ref_exit(&lun->lun_ref);
|
|
percpu_ref_exit(&lun->lun_ref);
|