summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tpg.c
diff options
context:
space:
mode:
authorBart Van Assche2018-11-28 00:51:57 +0100
committerMartin K. Petersen2018-12-08 03:20:07 +0100
commita95be3842c51c9ac32fe17faedf2c156ccf81bd7 (patch)
treec5b002c36310bc179f1b71c5039ea7d9b9d384fd /drivers/target/target_core_tpg.c
parentscsi: target/core: Use kvcalloc() instead of open-coding it (diff)
downloadkernel-qcow2-linux-a95be3842c51c9ac32fe17faedf2c156ccf81bd7.tar.gz
kernel-qcow2-linux-a95be3842c51c9ac32fe17faedf2c156ccf81bd7.tar.xz
kernel-qcow2-linux-a95be3842c51c9ac32fe17faedf2c156ccf81bd7.zip
scsi: target/core: Simplify transport_clear_lun_ref()
Since transport_clear_lun_ref() already waits until the percpu-refcount .release() method is called, it is not necessary to wait first until percpu_ref_kill_and_confirm() has finished transitioning the refcount into atomic mode. Remove the code that waits for percpu_ref_kill_and_confirm() to complete and also the completion object that is used by that code. This patch does not change the behavior of the SCSI target code. Cc: Nicholas Bellinger <nab@linux-iscsi.org> Cc: Mike Christie <mchristi@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: David Disseldorp <ddiss@suse.de> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r--drivers/target/target_core_tpg.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index 16e7a6500be4..e2ace1059437 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -577,7 +577,6 @@ struct se_lun *core_tpg_alloc_lun(
}
lun->unpacked_lun = unpacked_lun;
atomic_set(&lun->lun_acl_count, 0);
- init_completion(&lun->lun_ref_comp);
init_completion(&lun->lun_shutdown_comp);
INIT_LIST_HEAD(&lun->lun_deve_list);
INIT_LIST_HEAD(&lun->lun_dev_link);