Re: [RFC PATCH] mount: add OPEN_TREE_SKIP_MNTNS
From: Kirill Kolyshkin
Date: Sat Sep 26 2026 - 03:21:25 EST
On Fri, Sep 25, 2026 at 6:45 AM Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> On Wed, Sep 23, 2026 at 01:50:25PM -0700, Kir Kolyshkin wrote:
> > crun, a container runtime, recently started using OPEN_TREE_NAMESPACE to
> > set up the container's mount namespace, and open_tree(OPEN_TREE_CLONE)
> > for the sources of its bind mounts. This turns out not to work on hosts
> > that have a mount namespace pinned anywhere below such a source: the
> > recursive clone picks the pinned namespace up, and move_mount(2) then
> > refuses to attach the tree with ELOOP from check_for_nsfs_mounts().
> > This was reported to crun in [1].
>
> Yeah, I think that makes sense. Please split this into two patches
> though: semantic changes separate from test changes. Maybe call it
> OPEN_TREE_DROP_MNTNS_MOUNTS instead?
Thanks! Done in v2:
https://lore.kernel.org/r/20260926-nsfs-prune-rfc-v2-0-53509260e4e7@xxxxxxxxx