Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1021384ybt; Wed, 1 Jul 2020 16:26:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwsoduXOly8Zbkd823+7v0PCFeXMxnE1t+V10GPXOC5qC7QsEQ4iWE0exSQ1HsE9w8+R/tL X-Received: by 2002:a17:906:1386:: with SMTP id f6mr25280684ejc.66.1593645989493; Wed, 01 Jul 2020 16:26:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593645989; cv=none; d=google.com; s=arc-20160816; b=Ylm0s9Hgl1Jabs+VZg7D6AcTSNeEnYJKwNdHVABHM2VDm1KbvqQ37fmk+ZTXdSvMwt nJxa5ngty9W8kjOzT8oXMDcpUwEvOmMy/4ZBwCTU3O+owQQjL5rBYtRcPTML62NsePIQ EQrdIL2Poob3a29yXu2u+M9hV3U0TG9dmgpWDH+byH7BwU4MS9h06+JhhpEj+JN7lAGP WyLIHJ1B/ION6bP0d1v/GAb5b2+cc1CYtA3CsJm69TGvDDmwoxyKyNroxin0p03pAUvn re+Y+l3/sQthSS49LThMrnIYo5DvNLTD+KHlO6vt3gTmpBTDs8Au/eDxvCf9EigdD6Y8 5ERg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=g8leJMPGlyebLqo38dOH+g6HIGb9Iw/k3OTSYjC+6x4=; b=Gdvwz2dBikZYMsIEDW0ARDee4tMcr8ro/9S9zDSBu3g2TMiCN/R0PViHXaVS7BHJEA YLX3h/tV4v11MFKYp6+DWwm5Svk5BDBkGCSY+j0cLOyNLR0Qs7IQu3pa/XXmChB7Rheq cQNjN5v3GWwG+cCxe0K7PVJ35ysBGVkJ6NOCyhceDLJbXkpjrstqSN8+nAn6+z223gL2 kEextJNy/q53F4bBnc1m/iBbpZ/wWGURKhSD6cqATNW7Q7/BcCV/WhDpI2qI1lGmC60f LyIG2mmd76WyGLuW1Z+IViJTyXoWr1H/7HFVVHLgXL5NySd1q6F4tivgIpgwg8CHnjzL I0eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=KFfIae4J; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cn1si4818474edb.354.2020.07.01.16.26.06; Wed, 01 Jul 2020 16:26:29 -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=@samsung.com header.s=mail20170921 header.b=KFfIae4J; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727812AbgGAXZv (ORCPT + 99 others); Wed, 1 Jul 2020 19:25:51 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:31974 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726716AbgGAXZn (ORCPT ); Wed, 1 Jul 2020 19:25:43 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20200701232541epoutp0450e00ed69c46fccfe432abd4a4df48a2~dxIo4V_4J0119601196epoutp04f for ; Wed, 1 Jul 2020 23:25:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20200701232541epoutp0450e00ed69c46fccfe432abd4a4df48a2~dxIo4V_4J0119601196epoutp04f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1593645941; bh=g8leJMPGlyebLqo38dOH+g6HIGb9Iw/k3OTSYjC+6x4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KFfIae4Jt7r+se++s9HyQpS51tbxNs8PRxTHGwgJZkvbbcwnj2mwT53NscbgcoGh0 3GCQBLj/dAlUZEc/MODvQqcSZRPBgZWWcTgrsqtvZpWQ2LY7V1OvNQ9eBo/PGCAdzT 9As0BenBWtXnvqlPOoxCdzMAqAiXIaKMEPsInQ3E= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200701232540epcas1p290531fa0803c7d9c32e0861aae1d2234~dxIoiPSZf1693016930epcas1p2b; Wed, 1 Jul 2020 23:25:40 +0000 (GMT) Received: from epsmges1p2.samsung.com (unknown [182.195.40.166]) by epsnrtp4.localdomain (Postfix) with ESMTP id 49xy5H4jMxzMqYkh; Wed, 1 Jul 2020 23:25:39 +0000 (GMT) Received: from epcas1p2.samsung.com ( [182.195.41.46]) by epsmges1p2.samsung.com (Symantec Messaging Gateway) with SMTP id 81.1B.19033.37B1DFE5; Thu, 2 Jul 2020 08:25:39 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200701232538epcas1p1219929c259f41782831936a2afeeafdf~dxImy7Om81844818448epcas1p1P; Wed, 1 Jul 2020 23:25:38 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200701232538epsmtrp22eda4037d4cb830adc90d83c7c864ea2~dxImyNx7W1851918519epsmtrp26; Wed, 1 Jul 2020 23:25:38 +0000 (GMT) X-AuditID: b6c32a36-159ff70000004a59-77-5efd1b73eb61 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id B0.AE.08303.27B1DFE5; Thu, 2 Jul 2020 08:25:38 +0900 (KST) Received: from localhost.localdomain (unknown [10.88.103.87]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200701232538epsmtip268bbfa7188593f9f9346a4a0cc8f13ea~dxImm4CUv2699026990epsmtip2h; Wed, 1 Jul 2020 23:25:38 +0000 (GMT) From: Namjae Jeon To: gregkh@linuxfoundation.org, sashal@kernel.org Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org, Namjae Jeon Subject: [PATCH 5.7.y 4/5] exfat: move setting VOL_DIRTY over exfat_remove_entries() Date: Thu, 2 Jul 2020 08:20:23 +0900 Message-Id: <20200701232024.2083-5-namjae.jeon@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701232024.2083-1-namjae.jeon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBKsWRmVeSWpSXmKPExsWy7bCmnm6x9N84gwcnlS2aF69ns7i8aw6b xY/p9Rab1lxjs1iw8RGjA6vHplWdbB77565h9+jbsorR4/MmuQCWqBybjNTElNQihdS85PyU zLx0WyXv4HjneFMzA0NdQ0sLcyWFvMTcVFslF58AXbfMHKC1SgpliTmlQKGAxOJiJX07m6L8 0pJUhYz84hJbpdSClJwCQ4MCveLE3OLSvHS95PxcK0MDAyNToMqEnIxLh9uYC55xVPxZ2svY wLiZvYuRk0NCwERiWvMnli5GLg4hgR2MEj93/IZyPjFKXG/azAjhfGaU2Dt3PVxLz75nUIld jBLTzt5nhmt5sPA4UBUHB5uAtsSfLaIgDSIChhI3Pl9jAQkzCyRKnN/rChIWFgiT6H92DKya RUBV4vphfpAwr4C1xMWNMKvkJVZvOMAMYnMK2EisO/efESK+jl1i3p4wCNtF4sGbM2wQtrDE q+NboHqlJD6/28sGMl5CoFri435miHAHo8SL77YQtrHEzfUbWCEO05RYv0sfIqwosfP3XLBN zAJ8Eu++9rBCTOGV6GgTgihRlei7dJgJwpa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pBbBZJk4OKUamFx8pwpt cZcKijPfs9PTJEXQ4GbVNuvTzo8+3Fj3JeXHwsaX2XeNmUvmdrw5cuF6HMdX5ge9/p1+8XsU kn32JPg2eQgnHQz6/6nQOWrZFK4TtyVLGVM3qFh7GQk6Hbj2dH+e1pvgmX+ueB3cXeXDfXvN cxXzi83bNlZ7yqxVMY075Pb5cvFpXQYV3oWT7d4K1PIIiOyfX7Zou9W9y2FntnxzDPvK/k20 4pDstZwNN6r9i8/6Wlg6cd1kXrv50HJ+n6yoG0pT/sfYntLoLHG7WDJD7XaAiNCT3JWrayru PpVtyM6Runyv/KBmdG6U2zv7XYVrDs7iuLSyYHFQppU028eiYsZtnncWz2aVaODfo8RSnJFo qMVcVJwIABBkqN6VAgAA X-CMS-MailID: 20200701232538epcas1p1219929c259f41782831936a2afeeafdf X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200701232538epcas1p1219929c259f41782831936a2afeeafdf References: <20200701232024.2083-1-namjae.jeon@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move setting VOL_DIRTY over exfat_remove_entries() to avoid unneeded leaving VOL_DIRTY on -ENOTEMPTY. Fixes: 5f2aa075070c ("exfat: add inode operations") Cc: stable@vger.kernel.org # v5.7 Reported-by: Tetsuhiro Kohada Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon --- fs/exfat/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index 3bf1dbadab69..2c9c78317721 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -984,7 +984,6 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) goto unlock; } - exfat_set_vol_flags(sb, VOL_DIRTY); exfat_chain_set(&clu_to_free, ei->start_clu, EXFAT_B_TO_CLU_ROUND_UP(i_size_read(inode), sbi), ei->flags); @@ -1012,6 +1011,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) num_entries++; brelse(bh); + exfat_set_vol_flags(sb, VOL_DIRTY); err = exfat_remove_entries(dir, &cdir, entry, 0, num_entries); if (err) { exfat_msg(sb, KERN_ERR, -- 2.17.1