[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3hwzagok7cl3sz4x7wi7z4xwme54y3pyljfkqfjrbkjrbdlyih@rodvre2ii7f6>
Date: Thu, 18 Sep 2025 14:12:43 +0200
From: Michal Koutný <mkoutny@...e.com>
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>,
Daan De Meyer <daan.j.demeyer@...il.com>, 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>, 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, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH 14/14] ns: rename to __ns_ref
Hi.
On Thu, Sep 18, 2025 at 12:11:59PM +0200, Christian Brauner <brauner@...nel.org> wrote:
> --- a/include/linux/ns_common.h
> +++ b/include/linux/ns_common.h
> @@ -29,7 +29,7 @@ struct ns_common {
> struct dentry *stashed;
> const struct proc_ns_operations *ops;
> unsigned int inum;
> - refcount_t count;
> + refcount_t __ns_ref; /* do not use directly */
+ refcount_t __ns_ref; /* do not use directly unless initializing */
Or a helper macro like
#define NS_REFCOUNT_INIT(v) .ns.__ns_ref = REFCOUNT_INIT((v))
> /* cgroup namespace for init task */
> struct cgroup_namespace init_cgroup_ns = {
> - .ns.count = REFCOUNT_INIT(2),
> + .ns.__ns_ref = REFCOUNT_INIT(2),
> .user_ns = &init_user_ns,
> .ns.ops = &cgroupns_operations,
> .ns.inum = PROC_CGROUP_INIT_INO,
The double underscore stands out here.
Regards,
Michal
Download attachment "signature.asc" of type "application/pgp-signature" (266 bytes)
Powered by blists - more mailing lists