efivarfs: Move efivar availability check into FS context init
authorArd Biesheuvel <ardb@kernel.org>
Fri, 8 Dec 2023 16:39:27 +0000 (17:39 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 11 Dec 2023 10:19:17 +0000 (11:19 +0100)
commitd28076ddda34d13aee675fbed52e3275af00f64d
tree2d840c98010d1e0f658b5b8402379e15faa04507
parent0e8d2444168dd519fea501599d150e62718ed2fe
efivarfs: Move efivar availability check into FS context init

Instead of checking whether or not EFI variables are available when
creating the superblock, check it one step earlier, when initializing
the FS context for the mount. This way, no FS context will be created at
all, and we can drop the second check at .kill_sb() time entirely.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
fs/efivarfs/super.c