Commit 547713d5 authored by Ard Biesheuvel's avatar Ard Biesheuvel
Browse files

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: 5329aa51 ("efivarfs: Add uid/gid mount options")
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
parent d28076dd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 = {