From patchwork Fri Oct 13 07:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: piaojun X-Patchwork-Id: 10003553 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 24B3360325 for ; Fri, 13 Oct 2017 07:02:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1540528FD3 for ; Fri, 13 Oct 2017 07:02:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 09FB728FD6; Fri, 13 Oct 2017 07:02:00 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70BFE28FD3 for ; Fri, 13 Oct 2017 07:01:59 +0000 (UTC) Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9D71Fjs007579 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 13 Oct 2017 07:01:16 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9D71Aks015000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Oct 2017 07:01:10 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1e2ty2-00080Y-4I; Fri, 13 Oct 2017 00:01:10 -0700 Received: from aserv0022.oracle.com ([141.146.126.234]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1e2txz-00080N-CB for ocfs2-devel@oss.oracle.com; Fri, 13 Oct 2017 00:01:08 -0700 Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9D716Jw014788 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 13 Oct 2017 07:01:07 GMT Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.21/8.16.0.21) with SMTP id v9D6xxbd046916 for ; Fri, 13 Oct 2017 07:01:06 GMT Authentication-Results: oracle.com; spf=pass smtp.mailfrom=piaojun@huawei.com Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by userp2030.oracle.com with ESMTP id 2djfpbt85e-1 (version=TLSv1 cipher=RC4-SHA bits=128 verify=NOT) for ; Fri, 13 Oct 2017 07:01:06 +0000 Received: from 172.30.72.59 (EHLO DGGEMS402-HUB.china.huawei.com) ([172.30.72.59]) by dggrg04-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id DIZ04606; Fri, 13 Oct 2017 15:00:31 +0800 (CST) Received: from [10.177.253.249] (10.177.253.249) by smtp.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.301.0; Fri, 13 Oct 2017 15:00:07 +0800 To: , From: piaojun Message-ID: <59E06476.3090502@huawei.com> Date: Fri, 13 Oct 2017 15:00:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 X-Originating-IP: [10.177.253.249] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.59E0648F.00CD, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 8db4a64c40e0c581c030d862598a50f3 X-CLX-Shades: MLX X-CLX-Response: 1TFkXGxISEQpMehcbGBwRCllNF2dmchEKWUkXGnEaEBp3BhscEnEeHRAadwY YGgYaEQpZXhdobmYRCklGF0VYS0lGT3VaWEVOX0leQ0VEHhEKQ04XGkNjG1xBHVJpbWVwRHhCYH BIfUAbWxgZQV4fcnJTSXMRClhcFx8EGgQbGxMHG0gaThhOS08FGxoEGxsaBB4SBBIcEBseGh8aE QpeWRd4bE1GZBEKTVwXExwRCkxaF2loaU1NexEKQ1oXHh8EGB4TBBgbGAQbExoRCkJeFxsRCkRe FxgRCkRJFx4RCkJGF2VBRBxNTkMYEnxCEQpCXBcaEQpCRRdmXGx7cGRiehJ8QxEKQk4XbEJIWVM aTWV4eB0RCkJMF29LGRISRFl5WxtfEQpCbBdjBUJSZkBiXlp7UhEKQkAXZVtwQGxbe3BbHUsRCk JYF2J9b3kBTxgZcHB7EQpNXhcbEQpaWBcbEQpwaBdgRQFvaH4ZXGFhfxAaEQpwaBdnRWJLTF98R lJsHBAaEQpwaBdkfXhmZUYcSUxzYxAaEQpwaBdtaB1HXRgbaXxuaBAaEQpwaBdpThx7bGhHAWJQ fBAHGRoRCnBsF2FJeUN6c0l4Z2xiEBoRCm1+FxsRClhNF0sRIA== X-PDR: PASS X-ServerName: szxga04-in.huawei.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:45.249.212.32 ip4:45.249.212.35 ip4:119.145.14.93 ip4:58.251.152.93 ip4:194.213.3.17 ip4:206.16.17.72 ip4:45.249.212.255 ip4:45.249.212.187/29 ip4:45.249.212.191 ~all X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8682 signatures=668578 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=126 malwarescore=0 suspectscore=8 phishscore=0 bulkscore=0 spamscore=0 clxscore=188 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710130098 Cc: "ocfs2-devel@oss.oracle.com" Subject: [Ocfs2-devel] [PATCH 1/2] ocfs2: no need flush workqueue before destroying it X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Virus-Scanned: ClamAV using ClamSMTP destroy_workqueue() will do flushing work for us. Signed-off-by: Jun Piao Reviewed-by: Joseph Qi --- fs/ocfs2/dlm/dlmdomain.c | 1 - fs/ocfs2/dlmfs/dlmfs.c | 1 - fs/ocfs2/super.c | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index a2b19fb..e1fea14 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c @@ -394,7 +394,6 @@ int dlm_domain_fully_joined(struct dlm_ctxt *dlm) static void dlm_destroy_dlm_worker(struct dlm_ctxt *dlm) { if (dlm->dlm_worker) { - flush_workqueue(dlm->dlm_worker); destroy_workqueue(dlm->dlm_worker); dlm->dlm_worker = NULL; } diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index 9ab9e18..edce7b5 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c @@ -670,7 +670,6 @@ static void __exit exit_dlmfs_fs(void) { unregister_filesystem(&dlmfs_fs_type); - flush_workqueue(user_dlm_worker); destroy_workqueue(user_dlm_worker); /* diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 8073349..040bbb6 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c @@ -2521,10 +2521,8 @@ static void ocfs2_delete_osb(struct ocfs2_super *osb) /* This function assumes that the caller has the main osb resource */ /* ocfs2_initializer_super have already created this workqueue */ - if (osb->ocfs2_wq) { - flush_workqueue(osb->ocfs2_wq); + if (osb->ocfs2_wq) destroy_workqueue(osb->ocfs2_wq); - } ocfs2_free_slot_info(osb);