Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1610221pxb; Mon, 11 Oct 2021 09:26:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGaoCOPY+unLT3szf772sRlWgEARA3tEGoIpJtVxP2bjR/CJM/sAPcqOtHDKrMOI6VrCjn X-Received: by 2002:a17:90b:3504:: with SMTP id ls4mr30601141pjb.111.1633969560794; Mon, 11 Oct 2021 09:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633969560; cv=none; d=google.com; s=arc-20160816; b=UouUUxk0bYiTQT0jK55gS+oi15l8vudx6HQRu+LIUP1h8lIYdbVjrN3g6otlQIY+fY FWPNNHlAc+emshQi97+dTG07e7KsB07/yn6+tm61wNo+qVUGcwtrX+4LuUolV8h2JHH6 9ctW5qB9bKOCZFF7E0nS98tdhxfHO76YoiZ7C0ifi0RzMiNKS9dTeR9I0KofDAjWOTZx 4yihp4UnPbtmMxoo4uJCxH99u9N9JixRyuO3o2um9tja9gBSy3tQB9B6AT/hG7m431tf Ugxo9wcVJ5GaZ0L4/pKKVQCzBm76DtKba1yW08uNcBdwnyUPPrKt2zsw1FH3O2o4pCLk 0Hfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=GmDig8uR6zWhf7zrT1U+cYAgHxtWyD/idN3V+pqxfVE=; b=joW00uDEns5Kp4+7EJMK6D6ywKufpdNnoeaDoTKvZ60ShsDaCJ+7ijhk0KU77AFeDZ 0aIeWcmjAcW+f/y4zxzIRmckYxWI2y6G1v/i+dpG01QCmzsJlYUR2N2Y382q/AE7dmQ6 70DmOHt5bGdcBILiNr7C1GglIIJfJiev5SN8RqbVRpG1fnygbLxt8t+DsOEsXpkMzMdA EHaF3KR7N8c7dP9nj0kleM+osTtKd4PTmhoXE8OtuzFDDxDdKiLLEXMSDv/mXRa1Qwtd 5HBlFfPWXEdBvFvhVN3uDptCZ1WYks4yTURmeARcKzU6WJPhK2JD+ILWliqgHUHasOn6 RUSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UKRDw1MY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u10si11189330pgp.253.2021.10.11.09.25.48; Mon, 11 Oct 2021 09:26:00 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UKRDw1MY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236530AbhJKMVp (ORCPT + 99 others); Mon, 11 Oct 2021 08:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234762AbhJKMVo (ORCPT ); Mon, 11 Oct 2021 08:21:44 -0400 Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A38D2C061570; Mon, 11 Oct 2021 05:19:44 -0700 (PDT) Received: by mail-ua1-x932.google.com with SMTP id h4so12406032uaw.1; Mon, 11 Oct 2021 05:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=GmDig8uR6zWhf7zrT1U+cYAgHxtWyD/idN3V+pqxfVE=; b=UKRDw1MY9529cio6+Ud/0HXNC1CG9Em4E9iVWUVEuHPLRmniv6VpVhtIcYk2eDo8W5 sZ2p3tVf/pDmEpWzKV6OLBGzUHTBvQUwtGbwCAkzCcyc4ix2t+du4cQXDgJN4oi827E5 WftwthEpoSIoQXwxWcrVD/2YsVm1RYrsqkiHtBrVO4dSEcm15wPuHNG8C80u2u7SYtK9 jJcaCa3dU1gZ8bzgC1jHRpff/2bvLp2eNqqqd1oCW0OSdWSrvJJd5gOMUbM8VD+LYDiI MzHOJzA/MfP5v7YKH0545v39rjyueOvV0Ben1oBh6HtQtxoQ4Lp6VUsivr661bgnKrKY o8Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GmDig8uR6zWhf7zrT1U+cYAgHxtWyD/idN3V+pqxfVE=; b=4Yc+BYFTK9q65nSHIovogE30CAZKAN/QuWQnvon5VfThY4Njc04KcraMueNNEK2rjI wBfu9jdb7obf9rdVPPymnFRSzJABoHGssah8RhFfsnxWJrBXKnjS88mE/MJuwB03Jz6E 5UHaVtCAW4yGAd9IBlMJy1bGPYJosYahW80X/pSnrvx1UMVlEO7pApwymbK7CBhuWTPC 4SMiU/+sgmcOseOu9k3dvyCF3IlGjWTNe09Vp4N8ik1RqBiht1G84grIVC9FVpGuFGqJ 8FNl98crEMLjpu9P9aVzWAOj2sWAzp3U0D/5q9zolGAA9nd9p26oUYwk71N6wtz1pj1J vSZw== X-Gm-Message-State: AOAM5319rZN3gXSGNp43qySWLw8xfX+C5YNDm9RkMWV9NqBFh8cCDfpz ITFjhKFbYHHhfn/+wivl1FAcRGnmV94A7xgPIjY= X-Received: by 2002:a67:ca96:: with SMTP id a22mr9059095vsl.44.1633954783838; Mon, 11 Oct 2021 05:19:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Hyunchul Lee Date: Mon, 11 Oct 2021 21:19:32 +0900 Message-ID: Subject: Re: [PATCH] ksmbd: Remove redundant 'flush_workqueue()' calls To: Christophe JAILLET Cc: Namjae Jeon , Sergey Senozhatsky , Steve French , linux-cifs , LKML , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Hyunchul Lee 2021=EB=85=84 10=EC=9B=94 10=EC=9D=BC (=EC=9D=BC) =EC=98=A4=ED=9B=84 10:29,= Christophe JAILLET =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > '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 =3D 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 =3D NULL; > > if (smb_direct_wq) { > - flush_workqueue(smb_direct_wq); > destroy_workqueue(smb_direct_wq); > smb_direct_wq =3D NULL; > } > -- > 2.30.2 > --=20 Thanks, Hyunchul