|
Kmods SIG |
50e2b3 |
From 3bcfb701099acf96b0e883bf5544f96af473aa1d Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
50e2b3 |
From: Namjae Jeon <namjae.jeon@samsung.com>
|
|
Kmods SIG |
50e2b3 |
Date: Wed, 17 Jun 2020 12:17:18 +0900
|
|
Kmods SIG |
50e2b3 |
Subject: [Backport 3bcfb701099a] exfat: move setting VOL_DIRTY over
|
|
Kmods SIG |
50e2b3 |
exfat_remove_entries()
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
Move setting VOL_DIRTY over exfat_remove_entries() to avoid unneeded
|
|
Kmods SIG |
50e2b3 |
leaving VOL_DIRTY on -ENOTEMPTY.
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
Fixes: 5f2aa075070c ("exfat: add inode operations")
|
|
Kmods SIG |
50e2b3 |
Cc: stable@vger.kernel.org # v5.7
|
|
Kmods SIG |
50e2b3 |
Reported-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
|
|
Kmods SIG |
50e2b3 |
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
|
|
Kmods SIG |
50e2b3 |
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
|
|
Kmods SIG |
50e2b3 |
---
|
|
Kmods SIG |
50e2b3 |
src/namei.c | 2 +-
|
|
Kmods SIG |
50e2b3 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
diff --git a/src/namei.c b/src/namei.c
|
|
Kmods SIG |
50e2b3 |
index edd8023865a0e50d0854856ab57afc75ce56dd46..2b9e21094a96dbb252f38e34db272e567d665665 100644
|
|
Kmods SIG |
50e2b3 |
--- a/src/namei.c
|
|
Kmods SIG |
50e2b3 |
+++ b/src/namei.c
|
|
Kmods SIG |
50e2b3 |
@@ -975,7 +975,6 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
|
|
Kmods SIG |
50e2b3 |
goto unlock;
|
|
Kmods SIG |
50e2b3 |
}
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
- exfat_set_vol_flags(sb, VOL_DIRTY);
|
|
Kmods SIG |
50e2b3 |
exfat_chain_set(&clu_to_free, ei->start_clu,
|
|
Kmods SIG |
50e2b3 |
EXFAT_B_TO_CLU_ROUND_UP(i_size_read(inode), sbi), ei->flags);
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
@@ -1002,6 +1001,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
|
|
Kmods SIG |
50e2b3 |
num_entries++;
|
|
Kmods SIG |
50e2b3 |
brelse(bh);
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
+ exfat_set_vol_flags(sb, VOL_DIRTY);
|
|
Kmods SIG |
50e2b3 |
err = exfat_remove_entries(dir, &cdir, entry, 0, num_entries);
|
|
Kmods SIG |
50e2b3 |
if (err) {
|
|
Kmods SIG |
50e2b3 |
exfat_err(sb, "failed to exfat_remove_entries : err(%d)", err);
|
|
Kmods SIG |
50e2b3 |
--
|
|
Kmods SIG |
50e2b3 |
2.31.1
|
|
Kmods SIG |
50e2b3 |
|