From: Al Viro <viro@zeniv.linux.org.uk>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: linux-fsdevel@vger.kernel.org, linux-efi@vger.kernel.org,
Ard Biesheuvel <ardb@kernel.org>, Jeremy Kerr <jk@ozlabs.org>,
Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH v2 4/6] efivarfs: move freeing of variable entry into evict_inode
Date: Thu, 16 Jan 2025 18:36:43 +0000 [thread overview]
Message-ID: <20250116183643.GI1977892@ZenIV> (raw)
In-Reply-To: <20250107023525.11466-5-James.Bottomley@HansenPartnership.com>
On Mon, Jan 06, 2025 at 06:35:23PM -0800, James Bottomley wrote:
> 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.
Umm... I'd rather coallocate struct inode and struct efivar_entry;
that way once you get rid of the list you don't need ->evict_inode()
anymore.
It's pretty easy - see e.g. https://lore.kernel.org/all/20250112080705.141166-1-viro@zeniv.linux.org.uk/
for recent example of such conversion.
next prev parent reply other threads:[~2025-01-16 18:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 2:35 [PATCH v2 0/6] convert efivarfs to manage object data correctly James Bottomley
2025-01-07 2:35 ` [PATCH v2 1/6] efivarfs: remove unused efi_varaible.Attributes and .kobj James Bottomley
2025-01-07 2:35 ` [PATCH v2 2/6] efivarfs: add helper to convert from UC16 name and GUID to utf8 name James Bottomley
2025-01-07 2:35 ` [PATCH v2 3/6] efivarfs: make variable_is_present use dcache lookup James Bottomley
2025-01-07 2:35 ` [PATCH v2 4/6] efivarfs: move freeing of variable entry into evict_inode James Bottomley
2025-01-16 18:36 ` Al Viro [this message]
2025-01-16 19:05 ` James Bottomley
2025-01-16 22:13 ` James Bottomley
2025-01-19 14:50 ` Ard Biesheuvel
2025-01-19 14:57 ` James Bottomley
2025-01-19 16:31 ` Ard Biesheuvel
2025-01-19 16:46 ` James Bottomley
2025-01-07 2:35 ` [PATCH v2 5/6] efivarfs: remove unused efivarfs_list James Bottomley
2025-01-16 18:42 ` Al Viro
2025-01-16 18:55 ` James Bottomley
2025-01-07 2:35 ` [PATCH v2 6/6] efivarfs: fix error on write to new variable leaving remnants James Bottomley
2025-01-16 18:45 ` Al Viro
2025-01-16 18:54 ` James Bottomley
2025-01-16 18:59 ` Al Viro
2025-01-16 19:04 ` James Bottomley
2025-01-09 9:50 ` [PATCH v2 0/6] convert efivarfs to manage object data correctly Ard Biesheuvel
2025-01-09 14:24 ` Ard Biesheuvel
2025-01-09 15:50 ` James Bottomley
2025-01-09 16:11 ` Ard Biesheuvel
2025-01-18 13:53 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250116183643.GI1977892@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=James.Bottomley@hansenpartnership.com \
--cc=ardb@kernel.org \
--cc=brauner@kernel.org \
--cc=jk@ozlabs.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox