Re: [PATCH v2 18/33] mnt: support ns lookup
From: Christian Brauner
Date: Mon Sep 15 2025 - 09:45:10 EST
On Mon, Sep 15, 2025 at 01:48:51PM +0200, Jan Kara wrote:
> On Fri 12-09-25 13:52:41, Christian Brauner wrote:
> > Move the mount namespace to the generic ns lookup infrastructure.
> > This allows us to drop a bunch of members from struct mnt_namespace.
> > t
> > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
>
> Just one nit below. Feel free to add:
>
> Reviewed-by: Jan Kara <jack@xxxxxxx>
>
> > @@ -4185,11 +4107,11 @@ static struct mnt_namespace *alloc_mnt_ns(struct user_namespace *user_ns, bool a
> > return ERR_PTR(ret);
> > }
> > if (!anon)
> > - new_ns->seq = atomic64_inc_return(&mnt_ns_seq);
> > + ns_tree_gen_id(&new_ns->ns);
> > + RB_CLEAR_NODE(&new_ns->ns.ns_tree_node);
> > + INIT_LIST_HEAD(&new_ns->ns.ns_list_node);
>
> Why do you initialize ns_tree_node and ns_list_node here when
> ns_init_common() already initialized them?
I forgot to remove that. I should note I did all this while severly sick. :D