From 3ca485a067c650ca8d6d146faae41d130d7324aa Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 10 Jul 2026 11:33:24 +0200 Subject: [PATCH] binfmt_misc: include what is used The include list still reflects code that left this file years ago: nothing here uses sched/mm.h, pagemap.h, namei.h, syscalls.h or anything from fs/internal.h anymore, mount.h and the bm_fs_type forward declaration lost their last user when the pinned bm_mnt machinery was removed. Drop all of that and instead spell out the headers the file actually relies on but so far pulled in transitively: bitops, bits, bug, cleanup, cred, kstrtox, printk, refcount, string and user_namespace. With that nothing needs the kernel.h grab bag anymore, so it goes too, and the list is sorted alphabetically. Link: https://patch.msgid.link/20260710-work-binfmt_misc-locking-v3-23-a162f7cb58d6@kernel.org Signed-off-by: Christian Brauner (Amutable) --- fs/binfmt_misc.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index c6d7ba459737..62dbf99ca667 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -10,27 +10,29 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt -#include -#include -#include -#include -#include #include -#include +#include +#include +#include +#include +#include #include -#include #include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include -#include -#include -#include +#include +#include +#include #include - -#include "internal.h" +#include /* Entry status and match type bit numbers. */ enum binfmt_misc_entry_bits { @@ -62,8 +64,6 @@ struct binfmt_misc_entry { char buf[]; /* register string, fields point in here */ }; -static struct file_system_type bm_fs_type; - /* * Max length of the register string. Determined by: * - 7 delimiters -- 2.47.3