From patchwork Fri Mar 24 08:41:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitendra Bhivare X-Patchwork-Id: 9642393 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 639D760327 for ; Fri, 24 Mar 2017 08:42:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DBA2212E8 for ; Fri, 24 Mar 2017 08:42:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52B2928339; Fri, 24 Mar 2017 08:42:40 +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 05D51212E8 for ; Fri, 24 Mar 2017 08:42:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756429AbdCXImj (ORCPT ); Fri, 24 Mar 2017 04:42:39 -0400 Received: from mail-qt0-f180.google.com ([209.85.216.180]:36130 "EHLO mail-qt0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754330AbdCXImc (ORCPT ); Fri, 24 Mar 2017 04:42:32 -0400 Received: by mail-qt0-f180.google.com with SMTP id r45so5403708qte.3 for ; Fri, 24 Mar 2017 01:42:17 -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=Ucca2s4jRZOZ5mGvT5gbLi2FY+5zRzawLtrvYpDlnXIbPpyd3jzCtRb9yT8CoQlBMC WEkcJh02d/Qzvx3p8bD04LxzCfDYq+BoGGlvUa72GEYqY8p39QxUzHymUeYru7zG0GS0 FWedkYqBH0WgskN9CFRv+ww3kImHTuxAMGGqw= 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=LHM/4XIWFYl8KTU7p/aGjx3OdyFa1KeiRAJb6xTuDAxpJXMERNotE+FHZgbQ4QUrX4 NPrJ2aCDNhFrhbnsDraytHtxu2KK2vbHr9Vs00Wb6S4jX32bp+WKbvHcNwn7AGDVoRLD QoAUb+W37P+gR99eSG5pmny3Y38Y45Krdi7iiLvq1EkIixwSWIHRRLmA2Qx4kWmSsqm8 y/MUsrdkhKnY2xg60f6RJ2uVmkFxTX3itwtcFJpv5lk5pj7EAMjfxzLgYwx+tu9d+pYh j3BuHUAgKKeW9u6P78UXz2ybsZFWp/+HPzgTIewLh+QXVRX3l9oQTwYnL1VYYcJge4OC B5Yg== X-Gm-Message-State: AFeK/H0JGz/eUphkhfoZceKHDmYvMY8Kxq5CqG3q6oKw13YBr2s0p+AZsSiEaHH4aGTPRSGV X-Received: by 10.200.43.149 with SMTP id m21mr7232124qtm.102.1490344936359; Fri, 24 Mar 2017 01:42:16 -0700 (PDT) Received: from android.lvn.broadcom.net ([192.19.239.250]) by smtp.gmail.com with ESMTPSA id n21sm1080395qkh.16.2017.03.24.01.42.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 24 Mar 2017 01:42:15 -0700 (PDT) From: Jitendra Bhivare To: thenzl@redhat.com, cleech@redhat.com, lduncan@suse.com Cc: linux-scsi@vger.kernel.org, Jitendra Bhivare Subject: [PATCH v3 04/10] scsi_transport_iscsi: Use flush_work in iscsi_remove_session Date: Fri, 24 Mar 2017 14:11:43 +0530 Message-Id: <1490344909-29541-5-git-send-email-jitendra.bhivare@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490344909-29541-1-git-send-email-jitendra.bhivare@broadcom.com> References: <1490344909-29541-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 Reviewed-by: Tomas Henzl --- 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 */