Allow efivarfs to partake to resync variable state during system hibernation and suspend. Add freeze/thaw support. This is a pretty straightforward implementation. We simply add regular freeze/thaw support for both userspace and the kernel. This works without any big issues and congrats afaict efivars is the first pseudofilesystem that adds support for filesystem freezing and thawing. The simplicity comes from the fact that we simply always resync variable state after efivarfs has been frozen. It doesn't matter whether that's because of suspend, userspace initiated freeze or hibernation. Efivars is simple enough that it doesn't matter that we walk all dentries. There are no directories and there aren't insane amounts of entries and both freeze/thaw are already heavy-handed operations. If userspace initiated a freeze/thaw cycle they would need CAP_SYS_ADMIN in the initial user namespace (as that's where efivarfs is mounted) so it can't be triggered by random userspace. IOW, we really really don't care. @Ard, if you're fine with this (and agree with the patch) I'd carry this on a stable branch vfs-6.16.super that you can pull into efivarfs once -rc1 is out. Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> --- Christian Brauner (2): libfs: export find_next_child() efivarfs: support freeze/thaw fs/efivarfs/internal.h | 1 - fs/efivarfs/super.c | 196 +++++++++++++------------------------------------ fs/internal.h | 1 + fs/libfs.c | 3 +- 4 files changed, 54 insertions(+), 147 deletions(-) --- base-commit: 8876e79faf32838d05488996b896cb40247a4a8a change-id: 20250331-work-freeze-ae6260c405b9