]> www.infradead.org Git - users/jedix/linux-maple.git/commit
efivarfs: move variable lifetime management into the inodes
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Sun, 19 Jan 2025 15:12:10 +0000 (10:12 -0500)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 19 Jan 2025 16:50:26 +0000 (17:50 +0100)
commitfddca52766e276cb2fdc0be940ad75e0f01e214e
tree9748b8362d15a56e42ad82895a892fa0c0a60848
parent7e365c7e2cc587ac90c346a52156a6b08845d909
efivarfs: move variable lifetime management into the inodes

Make the inodes the default management vehicle for struct
efivar_entry, so they are now all freed automatically if the file is
removed and on unmount in kill_litter_super().  Remove the now
superfluous iterator to free the entries after kill_litter_super().

Also fixes a bug where some entry freeing was missing causing efivarfs
to leak memory.

Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
fs/efivarfs/inode.c
fs/efivarfs/internal.h
fs/efivarfs/super.c
fs/efivarfs/vars.c