diff options
author | Mike Christie <mchristi@redhat.com> | 2018-08-02 13:12:27 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-08-02 15:29:31 -0400 |
commit | 25b88550b7d57c6ae91b0e5f4b1be2aaa73a60df (patch) | |
tree | 40aec9bafa1fcd4db2c22e8227bff8dbff3df649 | |
parent | 60daca10065a13a133e88b738fdc5a40b3654575 (diff) |
scsi: target: loop, usb, vhost, xen: use target_remove_session
This converts drivers that were only calling transport_deregister_session
to use target_remove_session. The calling of
transport_deregister_session_configfs via target_remove_session for these
types of drivers is ok, because they were not exporting info from fields
like sess_acl_list, sess->se_tpg and sess->fabric_sess_ptr from configfs
accessible functions, so they will see no difference.
Signed-off-by: Mike Christie <mchristi@redhat.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/target/loopback/tcm_loop.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/function/f_tcm.c | 2 | ||||
-rw-r--r-- | drivers/vhost/scsi.c | 2 | ||||
-rw-r--r-- | drivers/xen/xen-scsiback.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c index 54b5b94dad37..bc8918f382e4 100644 --- a/drivers/target/loopback/tcm_loop.c +++ b/drivers/target/loopback/tcm_loop.c | |||
@@ -805,7 +805,7 @@ static int tcm_loop_drop_nexus( | |||
805 | /* | 805 | /* |
806 | * Release the SCSI I_T Nexus to the emulated Target Port | 806 | * Release the SCSI I_T Nexus to the emulated Target Port |
807 | */ | 807 | */ |
808 | transport_deregister_session(tl_nexus->se_sess); | 808 | target_remove_session(se_sess); |
809 | tpg->tl_nexus = NULL; | 809 | tpg->tl_nexus = NULL; |
810 | kfree(tl_nexus); | 810 | kfree(tl_nexus); |
811 | return 0; | 811 | return 0; |
diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c index ba7c5f68d38a..106988a6661a 100644 --- a/drivers/usb/gadget/function/f_tcm.c +++ b/drivers/usb/gadget/function/f_tcm.c | |||
@@ -1638,7 +1638,7 @@ static int tcm_usbg_drop_nexus(struct usbg_tpg *tpg) | |||
1638 | /* | 1638 | /* |
1639 | * Release the SCSI I_T Nexus to the emulated vHost Target Port | 1639 | * Release the SCSI I_T Nexus to the emulated vHost Target Port |
1640 | */ | 1640 | */ |
1641 | transport_deregister_session(tv_nexus->tvn_se_sess); | 1641 | target_remove_session(se_sess); |
1642 | tpg->tpg_nexus = NULL; | 1642 | tpg->tpg_nexus = NULL; |
1643 | 1643 | ||
1644 | kfree(tv_nexus); | 1644 | kfree(tv_nexus); |
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index e9368842c63f..76f8d649147b 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c | |||
@@ -1797,7 +1797,7 @@ static int vhost_scsi_drop_nexus(struct vhost_scsi_tpg *tpg) | |||
1797 | /* | 1797 | /* |
1798 | * Release the SCSI I_T Nexus to the emulated vhost Target Port | 1798 | * Release the SCSI I_T Nexus to the emulated vhost Target Port |
1799 | */ | 1799 | */ |
1800 | transport_deregister_session(tv_nexus->tvn_se_sess); | 1800 | target_remove_session(se_sess); |
1801 | tpg->tpg_nexus = NULL; | 1801 | tpg->tpg_nexus = NULL; |
1802 | mutex_unlock(&tpg->tv_tpg_mutex); | 1802 | mutex_unlock(&tpg->tv_tpg_mutex); |
1803 | 1803 | ||
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index 2ffc7ed944d8..2aadabd053c2 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c | |||
@@ -1576,7 +1576,7 @@ static int scsiback_drop_nexus(struct scsiback_tpg *tpg) | |||
1576 | /* | 1576 | /* |
1577 | * Release the SCSI I_T Nexus to the emulated xen-pvscsi Target Port | 1577 | * Release the SCSI I_T Nexus to the emulated xen-pvscsi Target Port |
1578 | */ | 1578 | */ |
1579 | transport_deregister_session(tv_nexus->tvn_se_sess); | 1579 | target_remove_session(se_sess); |
1580 | tpg->tpg_nexus = NULL; | 1580 | tpg->tpg_nexus = NULL; |
1581 | mutex_unlock(&tpg->tv_tpg_mutex); | 1581 | mutex_unlock(&tpg->tv_tpg_mutex); |
1582 | 1582 | ||