Commit 3bcfb701 authored by Namjae Jeon's avatar Namjae Jeon

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: 5f2aa075 ("exfat: add inode operations")
Cc: stable@vger.kernel.org # v5.7
Reported-by: default avatarTetsuhiro Kohada <kohada.t2@gmail.com>
Reviewed-by: default avatarSungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
parent a0271a15
...@@ -975,7 +975,6 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -975,7 +975,6 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
goto unlock; goto unlock;
} }
exfat_set_vol_flags(sb, VOL_DIRTY);
exfat_chain_set(&clu_to_free, ei->start_clu, exfat_chain_set(&clu_to_free, ei->start_clu,
EXFAT_B_TO_CLU_ROUND_UP(i_size_read(inode), sbi), ei->flags); 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) ...@@ -1002,6 +1001,7 @@ static int exfat_rmdir(struct inode *dir, struct dentry *dentry)
num_entries++; num_entries++;
brelse(bh); brelse(bh);
exfat_set_vol_flags(sb, VOL_DIRTY);
err = exfat_remove_entries(dir, &cdir, entry, 0, num_entries); err = exfat_remove_entries(dir, &cdir, entry, 0, num_entries);
if (err) { if (err) {
exfat_err(sb, "failed to exfat_remove_entries : err(%d)", err); exfat_err(sb, "failed to exfat_remove_entries : err(%d)", err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment