summaryrefslogtreecommitdiffstats
path: root/fs/efivarfs
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-12-08 17:39:28 +0100
committerArd Biesheuvel <ardb@kernel.org>2023-12-11 11:19:17 +0100
commit547713d502f7b4b8efccd409cff84d731a23853b (patch)
treeb75079bd8442dfe0c46436edbf89a57b6d71e3d0 /fs/efivarfs
parentefivarfs: Move efivar availability check into FS context init (diff)
downloadlinux-547713d502f7b4b8efccd409cff84d731a23853b.tar.xz
linux-547713d502f7b4b8efccd409cff84d731a23853b.zip
efivarfs: Free s_fs_info on unmount
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>
Diffstat (limited to 'fs/efivarfs')
-rw-r--r--fs/efivarfs/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/efivarfs/super.c b/fs/efivarfs/super.c
index d4530e4eac06..f954b1fab915 100644
--- a/fs/efivarfs/super.c
+++ b/fs/efivarfs/super.c
@@ -368,10 +368,13 @@ 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);
/* Remove all entries and destroy */
efivar_entry_iter(efivarfs_destroy, &efivarfs_list, NULL);
+ kfree(sfi);
}
static struct file_system_type efivarfs_type = {