diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2020-06-17 06:17:18 +0300 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2020-06-29 11:11:13 +0300 |
commit | 3bcfb701099acf96b0e883bf5544f96af473aa1d (patch) | |
tree | afe3d9bf979a4b77983e634cd3787579fc4dced3 /fs/exfat/namei.c | |
parent | a0271a15cf2cf907ea5b0f2ba611123f1b7935ec (diff) | |
download | linux-3bcfb701099acf96b0e883bf5544f96af473aa1d.tar.xz |
exfat: move setting VOL_DIRTY over exfat_remove_entries()
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 <kohada.t2@gmail.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/namei.c')
-rw-r--r-- | fs/exfat/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index edd8023865a0..2b9e21094a96 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -975,7 +975,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); @@ -1002,6 +1001,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_err(sb, "failed to exfat_remove_entries : err(%d)", err); |