Skip to content

Commit

Permalink
Revert "exfat: free the sbi and iocharset in ->kill_sb"
Browse files Browse the repository at this point in the history
This reverts commit 8269c2d7f032cdc59295a14d3418bda40be7c573.

Log:
../fs/exfat/super.c:1115:9: error: implicit declaration of function 'exfat_free_sbi'; did you mean 'exfat_free_inode'? [-Werror=implicit-function-declaration]
 1115 |         exfat_free_sbi(sbi);
      |         ^~~~~~~~~~~~~~
      |         exfat_free_inode

Signed-off-by: TogoFire <togofire@mailfence.com>
Change-Id: Ie7ad65ed921b1a4fdc02f2d138e9f8c0df18f3dc
  • Loading branch information
TogoFire committed Sep 25, 2024
1 parent 9dd483c commit 9724003
Showing 1 changed file with 10 additions and 18 deletions.
28 changes: 10 additions & 18 deletions fs/exfat/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ static void exfat_put_super(struct super_block *sb)
mutex_unlock(&sbi->s_lock);

unload_nls(sbi->nls_io);
exfat_free_iocharset(sbi);
exfat_free_upcase_table(sbi);
kfree(sbi);
}

static int exfat_sync_fs(struct super_block *sb, int wait)
Expand Down Expand Up @@ -739,6 +741,9 @@ static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)

check_nls_io:
unload_nls(sbi->nls_io);
exfat_free_iocharset(sbi);
sb->s_fs_info = NULL;
kfree(sbi);
return err;
}

Expand All @@ -747,18 +752,14 @@ static int exfat_get_tree(struct fs_context *fc)
return get_tree_bdev(fc, exfat_fill_super);
}

static void exfat_free_sbi(struct exfat_sb_info *sbi)
{
exfat_free_iocharset(sbi);
kfree(sbi);
}

static void exfat_free(struct fs_context *fc)
{
struct exfat_sb_info *sbi = fc->s_fs_info;

if (sbi)
exfat_free_sbi(sbi);
if (sbi) {
exfat_free_iocharset(sbi);
kfree(sbi);
}
}

static int exfat_reconfigure(struct fs_context *fc)
Expand Down Expand Up @@ -803,21 +804,12 @@ static int exfat_init_fs_context(struct fs_context *fc)
return 0;
}

static void exfat_kill_sb(struct super_block *sb)
{
struct exfat_sb_info *sbi = sb->s_fs_info;

kill_block_super(sb);
if (sbi)
exfat_free_sbi(sbi);
}

static struct file_system_type exfat_fs_type = {
.owner = THIS_MODULE,
.name = "exfat",
.init_fs_context = exfat_init_fs_context,
.parameters = exfat_parameters,
.kill_sb = exfat_kill_sb,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};

Expand Down

0 comments on commit 9724003

Please sign in to comment.