Re: [PATCH v3 11/70] ns: add active reference count

From: Christian Brauner

Date: Tue Oct 28 2025 - 11:33:53 EST


On Mon, Oct 27, 2025 at 05:36:27PM +0100, Thomas Gleixner wrote:
> On Fri, Oct 24 2025 at 12:52, Christian Brauner wrote:
> > diff --git a/kernel/time/namespace.c b/kernel/time/namespace.c
> > index ee05cad288da..2e7c110bd13f 100644
> > --- a/kernel/time/namespace.c
> > +++ b/kernel/time/namespace.c
> > @@ -106,6 +106,7 @@ static struct time_namespace *clone_time_ns(struct user_namespace *user_ns,
> > ns->offsets = old_ns->offsets;
> > ns->frozen_offsets = false;
> > ns_tree_add(ns);
> > + ns_ref_active_get_owner(ns);
>
> It seems all places where ns_ref_active_get_owner() is added it is
> preceeded by a variant of ns_tree_add(). So why don't you stilck that
> refcount thing into ns_tree_add()? I'm probably missing something here.

Yes, as usual a very astute observation. I've taken your advice and
folded the parent count into __ns_tree_add_raw(). Thanks!