Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp652018pxb; Sun, 10 Oct 2021 07:45:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWndi8nsgVU6o9LB/icz7+hyKbN/kjyk1/wj2i/Klt7jm4QUfVbi0PwoCtIkoBsTgU5cYG X-Received: by 2002:a50:c006:: with SMTP id r6mr33847702edb.289.1633877131284; Sun, 10 Oct 2021 07:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633877131; cv=none; d=google.com; s=arc-20160816; b=fJSLxro17kPN/Ppz2Cp+TdFYoqSYIiRGvBJLNEUsSG3bsaWHX4v4DQJ1qRhV1fD3Bq 9MxoD3twTBmenpRHD7L5DNE7vvv0tR6m5X5MRh80bNeztmiA4KlvfNp/4QYZ50Gs5+SD 26QV8eIh1IiZLbz0s+FoxXjjS7okPNLFCytU3eoa3GLM2pTZrjWjqUoSmLe0mv6IEJgw xpGtgSexwds5510cx+vAFWkxVuLXjMOI16SaolW7zbmILu+521/zCQjOekXVSeeQxJg4 /nCiFoxD1GOEcHLKrRRnOv2NjN3sqWk8hId6jLsgCLTyx1nUrUKdsp/QwQsxeKyf3HKi ag0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=tjaR34nfXLBXG+Z326Pm8CumcqsTmbDdNxdpmvKa2RU=; b=P/5BXFqySBat2dZaZ9mm7gSx53htCxQ8i2z78tF6BY24x8dPm0TOw6ikbNDxfr5viz KrekBQf2WxjrleXiiI4ei7PHzGkXy6A5wpLIfdMIYQFE5SKzMfUPsSL5wca/0AUi3d8K dXMbpp3rh35dHQoc0UapTDjecfqw49PQLUW/xtaZzTriSHGd/jvFjFmgmxFfqOECsywm KVx56qX8DaalpE63Fddss7j8KtnEV82IPE2QNfxhUF69vpaM7iF8P7gIG0tWHdM8POBj 3P2V5YDSVNiKEOO3MHChIz13RtjxpPbDt6vOIGTdXaaRrnfE61vjZ/wWh3+R3qIZbmxg RHjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si11587323edb.85.2021.10.10.07.45.07; Sun, 10 Oct 2021 07:45:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232736AbhJJNXp (ORCPT + 99 others); Sun, 10 Oct 2021 09:23:45 -0400 Received: from smtp13.smtpout.orange.fr ([80.12.242.135]:48415 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232697AbhJJNXi (ORCPT ); Sun, 10 Oct 2021 09:23:38 -0400 Received: from pop-os.home ([90.126.248.220]) by mwinf5d78 with ME id 4DMc2600C4m3Hzu03DMdYq; Sun, 10 Oct 2021 15:21:38 +0200 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 10 Oct 2021 15:21:38 +0200 X-ME-IP: 90.126.248.220 From: Christophe JAILLET To: linkinjeon@kernel.org, senozhatsky@chromium.org, sfrench@samba.org, hyc.lee@gmail.com Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] ksmbd: Remove redundant 'flush_workqueue()' calls Date: Sun, 10 Oct 2021 15:21:35 +0200 Message-Id: X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly. Remove the redundant 'flush_workqueue()' calls. This was generated with coccinelle: @@ expression E; @@ - flush_workqueue(E); destroy_workqueue(E); Signed-off-by: Christophe JAILLET --- fs/ksmbd/ksmbd_work.c | 1 - fs/ksmbd/transport_rdma.c | 1 - 2 files changed, 2 deletions(-) diff --git a/fs/ksmbd/ksmbd_work.c b/fs/ksmbd/ksmbd_work.c index fd58eb4809f6..14b9caebf7a4 100644 --- a/fs/ksmbd/ksmbd_work.c +++ b/fs/ksmbd/ksmbd_work.c @@ -69,7 +69,6 @@ int ksmbd_workqueue_init(void) void ksmbd_workqueue_destroy(void) { - flush_workqueue(ksmbd_wq); destroy_workqueue(ksmbd_wq); ksmbd_wq = NULL; } diff --git a/fs/ksmbd/transport_rdma.c b/fs/ksmbd/transport_rdma.c index 3a7fa23ba850..0fa7b9c17af3 100644 --- a/fs/ksmbd/transport_rdma.c +++ b/fs/ksmbd/transport_rdma.c @@ -2026,7 +2026,6 @@ int ksmbd_rdma_destroy(void) smb_direct_listener.cm_id = NULL; if (smb_direct_wq) { - flush_workqueue(smb_direct_wq); destroy_workqueue(smb_direct_wq); smb_direct_wq = NULL; } -- 2.30.2