summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
diff options
context:
space:
mode:
authorJitendra Bhivare <jitendra.bhivare@broadcom.com>2017-03-24 09:41:43 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2017-03-28 04:03:33 +0200
commit90e96313a9d38c21d4b9f81a824d0fbebb5d307c (patch)
tree8331267f9f37c8146b4e602608102ced96b328ee /drivers/scsi/scsi_transport_iscsi.c
parentscsi: be2iscsi: Replace spin_unlock_bh with spin_lock (diff)
downloadlinux-90e96313a9d38c21d4b9f81a824d0fbebb5d307c.tar.xz
linux-90e96313a9d38c21d4b9f81a824d0fbebb5d307c.zip
scsi: scsi_transport_iscsi: Use flush_work in iscsi_remove_session
scsi_flush_work flushes workqueue for the Scsi_Host. In iSCSI offload enabled host, this would wait for all other sessions under the host. Use flush_work for the session being removed instead. Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Chris Leech <cleech@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_iscsi.c')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 568c9f26a561..a424eaeafeb0 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -2158,7 +2158,6 @@ static int iscsi_iter_destroy_conn_fn(struct device *dev, void *data)
void iscsi_remove_session(struct iscsi_cls_session *session)
{
- struct Scsi_Host *shost = iscsi_session_to_shost(session);
unsigned long flags;
int err;
@@ -2185,7 +2184,7 @@ void iscsi_remove_session(struct iscsi_cls_session *session)
scsi_target_unblock(&session->dev, SDEV_TRANSPORT_OFFLINE);
/* flush running scans then delete devices */
- scsi_flush_work(shost);
+ flush_work(&session->scan_work);
__iscsi_unbind_session(&session->unbind_work);
/* hw iscsi may not have removed all connections from session */