summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tpg.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2015-05-19 16:16:01 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2015-06-01 00:25:39 -0700
commitb3eeea6619a0ed4f37138661c49339b21361d397 (patch)
tree68236615b4ab4ac9f3644f244aab35d6077b58a5 /drivers/target/target_core_tpg.c
parent3effdb9094fd06b9c61ecef08d610ae90805fd98 (diff)
downloadlinux-stable-b3eeea6619a0ed4f37138661c49339b21361d397.tar.gz
linux-stable-b3eeea6619a0ed4f37138661c49339b21361d397.tar.bz2
linux-stable-b3eeea6619a0ed4f37138661c49339b21361d397.zip
target: Simplify LUN shutdown code
Instead of starting a thread from transport_clear_lun_ref() that waits for LUN shutdown, wait in that function for LUN shutdown to finish. Additionally, change the return type of transport_clear_lun_ref() from int to void. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r--drivers/target/target_core_tpg.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index 91f8ddb6d783..fd531fcf3191 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -494,7 +494,6 @@ static int core_tpg_setup_virtual_lun0(struct se_portal_group *se_tpg)
lun->unpacked_lun = 0;
atomic_set(&lun->lun_acl_count, 0);
- init_completion(&lun->lun_shutdown_comp);
spin_lock_init(&lun->lun_sep_lock);
init_completion(&lun->lun_ref_comp);
@@ -606,7 +605,6 @@ struct se_lun *core_tpg_alloc_lun(
lun->unpacked_lun = unpacked_lun;
lun->lun_link_magic = SE_LUN_LINK_MAGIC;
atomic_set(&lun->lun_acl_count, 0);
- init_completion(&lun->lun_shutdown_comp);
spin_lock_init(&lun->lun_sep_lock);
init_completion(&lun->lun_ref_comp);