[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3wstxh4522vxbysmtisvvocuuj6wvldy57bskwpeulaeolvk4y@oqri2hz4gpfy>
Date: Wed, 24 Sep 2025 13:46:53 +0200
From: Jan Kara <jack@...e.cz>
To: Christian Brauner <brauner@...nel.org>
Cc: linux-fsdevel@...r.kernel.org, Amir Goldstein <amir73il@...il.com>,
Josef Bacik <josef@...icpanda.com>, Jeff Layton <jlayton@...nel.org>, Mike Yuan <me@...dnzj.com>,
Zbigniew Jędrzejewski-Szmek <zbyszek@...waw.pl>, Lennart Poettering <mzxreary@...inter.de>,
Aleksa Sarai <cyphar@...har.com>, Alexander Viro <viro@...iv.linux.org.uk>,
Jan Kara <jack@...e.cz>, Tejun Heo <tj@...nel.org>, Johannes Weiner <hannes@...xchg.org>,
Michal Koutný <mkoutny@...e.com>, Jakub Kicinski <kuba@...nel.org>,
Anna-Maria Behnsen <anna-maria@...utronix.de>, Frederic Weisbecker <frederic@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>, cgroups@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 1/3] nstree: make struct ns_tree private
On Wed 24-09-25 13:33:58, Christian Brauner wrote:
> Don't expose it directly. There's no need to do that.
>
> Signed-off-by: Christian Brauner <brauner@...nel.org>
Nice. Feel free to add:
Reviewed-by: Jan Kara <jack@...e.cz>
Honza
> ---
> include/linux/nstree.h | 13 -------------
> kernel/nstree.c | 13 +++++++++++++
> 2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/include/linux/nstree.h b/include/linux/nstree.h
> index 29ad6402260c..8b8636690473 100644
> --- a/include/linux/nstree.h
> +++ b/include/linux/nstree.h
> @@ -9,19 +9,6 @@
> #include <linux/rculist.h>
> #include <linux/cookie.h>
>
> -/**
> - * struct ns_tree - Namespace tree
> - * @ns_tree: Rbtree of namespaces of a particular type
> - * @ns_list: Sequentially walkable list of all namespaces of this type
> - * @ns_tree_lock: Seqlock to protect the tree and list
> - */
> -struct ns_tree {
> - struct rb_root ns_tree;
> - struct list_head ns_list;
> - seqlock_t ns_tree_lock;
> - int type;
> -};
> -
> extern struct ns_tree cgroup_ns_tree;
> extern struct ns_tree ipc_ns_tree;
> extern struct ns_tree mnt_ns_tree;
> diff --git a/kernel/nstree.c b/kernel/nstree.c
> index bbe8bedc924c..113d681857f1 100644
> --- a/kernel/nstree.c
> +++ b/kernel/nstree.c
> @@ -4,6 +4,19 @@
> #include <linux/proc_ns.h>
> #include <linux/vfsdebug.h>
>
> +/**
> + * struct ns_tree - Namespace tree
> + * @ns_tree: Rbtree of namespaces of a particular type
> + * @ns_list: Sequentially walkable list of all namespaces of this type
> + * @ns_tree_lock: Seqlock to protect the tree and list
> + */
> +struct ns_tree {
> + struct rb_root ns_tree;
> + struct list_head ns_list;
> + seqlock_t ns_tree_lock;
> + int type;
> +};
> +
> struct ns_tree mnt_ns_tree = {
> .ns_tree = RB_ROOT,
> .ns_list = LIST_HEAD_INIT(mnt_ns_tree.ns_list),
>
> --
> 2.47.3
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists