]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ns: use anonymous struct to group list member
authorChristian Brauner <brauner@kernel.org>
Wed, 29 Oct 2025 12:20:25 +0000 (13:20 +0100)
committerChristian Brauner <brauner@kernel.org>
Mon, 3 Nov 2025 16:41:17 +0000 (17:41 +0100)
Make it easier to spot that they belong together conceptually.

Link: https://patch.msgid.link/20251029-work-namespace-nstree-listns-v4-12-2e6f823ebdc0@kernel.org
Tested-by: syzbot@syzkaller.appspotmail.com
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
include/linux/ns_common.h

index bdd0df15ad9cbef97edea94f7095ff6284d6f746..32463203c8244c622adbfeb311452984b9b5e1fe 100644 (file)
@@ -109,8 +109,10 @@ struct ns_common {
        union {
                struct {
                        u64 ns_id;
-                       struct rb_node ns_tree_node;
-                       struct list_head ns_list_node;
+                       struct /* per type rbtree and list */ {
+                               struct rb_node ns_tree_node;
+                               struct list_head ns_list_node;
+                       };
                        atomic_t __ns_ref_active; /* do not use directly */
                };
                struct rcu_head ns_rcu;