Skip to content

Commit c69d8e9

Browse files
committed
Merge tag 'exfat-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat
Pull exfat updates from Namjae Jeon: - Fix xfstests generic/482 test failure - Fix double free in delayed_free * tag 'exfat-for-6.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: do not clear volume dirty flag during sync exfat: fix double free in delayed_free
2 parents a56baa2 + 46a5576 commit c69d8e9

File tree

2 files changed

+8
-23
lines changed

2 files changed

+8
-23
lines changed

fs/exfat/nls.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,4 +801,5 @@ int exfat_create_upcase_table(struct super_block *sb)
801801
void exfat_free_upcase_table(struct exfat_sb_info *sbi)
802802
{
803803
kvfree(sbi->vol_utbl);
804+
sbi->vol_utbl = NULL;
804805
}

fs/exfat/super.c

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,31 +36,12 @@ static void exfat_put_super(struct super_block *sb)
3636
struct exfat_sb_info *sbi = EXFAT_SB(sb);
3737

3838
mutex_lock(&sbi->s_lock);
39+
exfat_clear_volume_dirty(sb);
3940
exfat_free_bitmap(sbi);
4041
brelse(sbi->boot_bh);
4142
mutex_unlock(&sbi->s_lock);
4243
}
4344

44-
static int exfat_sync_fs(struct super_block *sb, int wait)
45-
{
46-
struct exfat_sb_info *sbi = EXFAT_SB(sb);
47-
int err = 0;
48-
49-
if (unlikely(exfat_forced_shutdown(sb)))
50-
return 0;
51-
52-
if (!wait)
53-
return 0;
54-
55-
/* If there are some dirty buffers in the bdev inode */
56-
mutex_lock(&sbi->s_lock);
57-
sync_blockdev(sb->s_bdev);
58-
if (exfat_clear_volume_dirty(sb))
59-
err = -EIO;
60-
mutex_unlock(&sbi->s_lock);
61-
return err;
62-
}
63-
6445
static int exfat_statfs(struct dentry *dentry, struct kstatfs *buf)
6546
{
6647
struct super_block *sb = dentry->d_sb;
@@ -219,7 +200,6 @@ static const struct super_operations exfat_sops = {
219200
.write_inode = exfat_write_inode,
220201
.evict_inode = exfat_evict_inode,
221202
.put_super = exfat_put_super,
222-
.sync_fs = exfat_sync_fs,
223203
.statfs = exfat_statfs,
224204
.show_options = exfat_show_options,
225205
.shutdown = exfat_shutdown,
@@ -751,10 +731,14 @@ static void exfat_free(struct fs_context *fc)
751731

752732
static int exfat_reconfigure(struct fs_context *fc)
753733
{
734+
struct super_block *sb = fc->root->d_sb;
754735
fc->sb_flags |= SB_NODIRATIME;
755736

756-
/* volume flag will be updated in exfat_sync_fs */
757-
sync_filesystem(fc->root->d_sb);
737+
sync_filesystem(sb);
738+
mutex_lock(&EXFAT_SB(sb)->s_lock);
739+
exfat_clear_volume_dirty(sb);
740+
mutex_unlock(&EXFAT_SB(sb)->s_lock);
741+
758742
return 0;
759743
}
760744

0 commit comments

Comments
 (0)