From patchwork Tue Mar 14 08:01:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitendra Bhivare X-Patchwork-Id: 9622653 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E58A860244 for ; Tue, 14 Mar 2017 08:02:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3EA72808F for ; Tue, 14 Mar 2017 08:02:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7CA42811C; Tue, 14 Mar 2017 08:02:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 871032808F for ; Tue, 14 Mar 2017 08:02:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750924AbdCNICJ (ORCPT ); Tue, 14 Mar 2017 04:02:09 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:37847 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750904AbdCNICI (ORCPT ); Tue, 14 Mar 2017 04:02:08 -0400 Received: by mail-wm0-f48.google.com with SMTP id n11so57108208wma.0 for ; Tue, 14 Mar 2017 01:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hbcwIHRauIVQ8yT9K1a4wrjVUim4XH1INJSG7Y9CO8U=; b=Y73RbRk9yvOqmn2feuGmDTSkDuSCPt1U8cCAC6gaw+j/qjyyZ+vFfV0QT2l0LM7E65 Fhg/BeRcyeTXPxL61luh4aUNY5f58UlOjd06CxqjoZiytlM87pnHWl7BpWKIiABWDNpU JBmugsQkwN63ErL6ukTgeQuDKkJp5ZrjVxNXM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hbcwIHRauIVQ8yT9K1a4wrjVUim4XH1INJSG7Y9CO8U=; b=Uz0m9h86qnK/aJvvXj4Ua/+Pdoq4ZG/aGWpyjVaZC2M+ADJrhuF2sSVrr2GIBzuTAW M4fzCu8FVyYIfqqkWqKsYR7g/vedhVHEvGXs2PP6u1x8hQTGKnL7LhiK34If2mXjSBGI 8H2//My6cgvVvNBrN4GkUzaqnKwUkrrioU4EBaArb2lf9jx4w8LXQqLnbyCJxRuO0Kbi 6WVtrowckONEqOfErF41p1Yc3a6vJ5bBtNGYxwipgm9ygEyxMvarWJTsYNpkGliD0mQG QQF09WkSqj4XHPD4vbypYNX3u/VoXU+27YL2gkFMMedfx11T8ncKvmyDhZ1Vc1iltEAm IcrA== X-Gm-Message-State: AFeK/H32fV8iC2WU3EtvWwYiW5Z0hscr0DswFIssJFIG2okN5Yy+OTI1tTwOJvOK33UG1hWA X-Received: by 10.28.168.130 with SMTP id r124mr13385431wme.34.1489478526525; Tue, 14 Mar 2017 01:02:06 -0700 (PDT) Received: from android.dhcp.avagotech.net ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id 63sm28112281wrh.68.2017.03.14.01.02.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Mar 2017 01:02:05 -0700 (PDT) From: Jitendra Bhivare To: cleech@redhat.com, lduncan@suse.com Cc: linux-scsi@vger.kernel.org, Jitendra Bhivare Subject: [PATCH 4/9] scsi_transport_iscsi: Use flush_work in iscsi_remove_session Date: Tue, 14 Mar 2017 13:31:29 +0530 Message-Id: <1489478494-5432-5-git-send-email-jitendra.bhivare@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489478494-5432-1-git-send-email-jitendra.bhivare@broadcom.com> References: <1489478494-5432-1-git-send-email-jitendra.bhivare@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/scsi/scsi_transport_iscsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 568c9f2..a424eae 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 */