From b3eeea6619a0ed4f37138661c49339b21361d397 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 19 May 2015 16:16:01 +0200 Subject: 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 Reviewed-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_tpg.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/target/target_core_tpg.c') 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); -- cgit v1.2.3