From patchwork Thu Mar 16 03:24:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitendra Bhivare X-Patchwork-Id: 9627045 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 97AB860244 for ; Thu, 16 Mar 2017 03:26:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D4FB28604 for ; Thu, 16 Mar 2017 03:26:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8237328637; Thu, 16 Mar 2017 03:26:08 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 41F0428604 for ; Thu, 16 Mar 2017 03:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751147AbdCPD0G (ORCPT ); Wed, 15 Mar 2017 23:26:06 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:36745 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbdCPD0B (ORCPT ); Wed, 15 Mar 2017 23:26:01 -0400 Received: by mail-wr0-f180.google.com with SMTP id u108so23110829wrb.3 for ; Wed, 15 Mar 2017 20:25:25 -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=dHDuZWzGURU5jEkrG65hQp+oyXFpu3h0q7ieIFki4BSW2Q4tinsA3UjsUbNS53N3ZY 6VdKymAva/ZK9Ca2yfPpcitISTFCdkuv1lYqK5h2BqbY0id8Ixv7487+fjvZoJW6levu TChiZQ9DURKBaODaHjTMKvKgaJ9eP2E4L9rSk= 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=ICgxCzZL62h7A7SYzy1M0Jmv1U7I2Rb9yo1C98varq4teEvpEv3beuZFhGiDzFbya3 en3eikr4holfslGKULXkLDLDN+SRrYvpVl5fKZS3s8zwQ/oiejTF27Wax4B0jNkxpmgq +9Og/LyBXuK5ZSpSXD6c6NVOzz0NbAyfXofjhNnu+Un8KG0LM8932A7EskdDaWwDPrzr sN8QjjrDJCsX27wodQHI0LsLecWLb36t+j555kSARWJC/9TlgkP/DeKRc0kKMX6syIwQ kgRU1SzIZ3neYzkxDc9SEM2ozJVCpxqCWFObQRRsCuBJ8JCRJq+N4l6Vg2TmLEjYJuLd IdfA== X-Gm-Message-State: AFeK/H1oSbwvHiVhGva4pnJnERv8HteNYhI00to5bsaea0TcpGZSbuKnwhhe0Xtb0LDzYJ4f X-Received: by 10.223.131.3 with SMTP id 3mr5863824wrd.153.1489634724569; Wed, 15 Mar 2017 20:25:24 -0700 (PDT) Received: from android.dhcp.avagotech.net ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id l21sm4454655wrl.59.2017.03.15.20.25.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 15 Mar 2017 20:25:23 -0700 (PDT) From: Jitendra Bhivare To: cleech@redhat.com, lduncan@suse.com Cc: linux-scsi@vger.kernel.org, Jitendra Bhivare Subject: [PATCH v2 04/10] scsi_transport_iscsi: Use flush_work in iscsi_remove_session Date: Thu, 16 Mar 2017 08:54:39 +0530 Message-Id: <1489634685-4975-5-git-send-email-jitendra.bhivare@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489634685-4975-1-git-send-email-jitendra.bhivare@broadcom.com> References: <1489634685-4975-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 */