[PATCH RFC 07/16] treewide: let procfs own the seq_file of simple proc entries
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Tue Nov 3 07:01:15 PST 2026
> Most proc entries that bring their own struct proc_ops only call
> single_open(), seq_open() or seq_open_private() in ->proc_open() and
> free the seq_file with the matching helper. Declare the show function
> or the seq_operations instead and let procfs open and free the
> seq_file. Reading these files then no longer holds up their removal.
>
> Done with the following semantic patch. The new initializers were
> aligned like their neighbours afterwards:
>
> // SPDX-License-Identifier: GPL-2.0-only
> /// Let procfs open the seq_file of proc entries whose ->proc_open() only
> /// calls single_open(), seq_open() or seq_open_private().
> //
> // Confidence: High
> // Options: --no-includes --include-headers
> [ ... ]
> identifier open_fn = {single.open_fn, seq.open_fn, priv.open_fn};
> @@
> - static int open_fn(...) { ... }
>
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102-work-procfs-core-v1-0-75df35e4f8b8@kernel.org?part=7
More information about the kexec
mailing list