diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2023-12-08 17:39:28 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-01-25 15:35:15 -0800 |
commit | 48be1364dd387e375e1274b76af986cb8747be2c (patch) | |
tree | bc09ad9a70ab8ca9c40fbf1cbca95465eacdeafe /fs | |
parent | 0049fe7e4a85849bdd778cdb72e51a791ff3d737 (diff) | |
download | linux-stable-48be1364dd387e375e1274b76af986cb8747be2c.tar.gz linux-stable-48be1364dd387e375e1274b76af986cb8747be2c.tar.bz2 linux-stable-48be1364dd387e375e1274b76af986cb8747be2c.zip |
efivarfs: Free s_fs_info on unmount
[ Upstream commit 547713d502f7b4b8efccd409cff84d731a23853b ]
Now that we allocate a s_fs_info struct on fs context creation, we
should ensure that we free it again when the superblock goes away.
Fixes: 5329aa5101f7 ("efivarfs: Add uid/gid mount options")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/efivarfs/super.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c index 05c01694e852..d59d9670965c 100644 --- a/fs/efivarfs/super.c +++ b/fs/efivarfs/super.c @@ -299,6 +299,8 @@ static int efivarfs_init_fs_context(struct fs_context *fc) static void efivarfs_kill_sb(struct super_block *sb) { + struct efivarfs_fs_info *sfi = sb->s_fs_info; + kill_litter_super(sb); if (!efivar_is_available()) @@ -306,6 +308,7 @@ static void efivarfs_kill_sb(struct super_block *sb) /* Remove all entries and destroy */ efivar_entry_iter(efivarfs_destroy, &efivarfs_list, NULL); + kfree(sfi); } static struct file_system_type efivarfs_type = { |