Re: Removing shared subtrees?

From: Al Viro
Date: Mon Sep 29 2014 - 20:30:13 EST

On Mon, Sep 29, 2014 at 05:14:55PM -0700, Andy Lutomirski wrote:
> I understand that:
> # mount --make-rshared /
> # mount --rbind / /mnt
> # umount - /mnt/dev
> should unmount /dev. That's the whole point. But why does unmounting
> */mnt* propagate like that? It doesn't unmount /. To me, this makes
> about as much sense as having 'umount -l /mnt/dev' unmount /dev/pts
> but *not* /dev would make.

Aha. And what, pray tell, does umount -l /mnt do to mounts deeper in
the tree? Forget about shared, etc. - what, in your opinion, does umount -l
mean wrt the stuff mounted on /mnt? /mnt/dev, for example...

> > What for?
> Simplicity and comprehensibility.

Such an elegant way to say "I can't be arsed to read"... For what it's
worth: MNT_DETACH is *not* "detach the subtree as whole, busy or not".
It's "unmount all mounts within the subtree, busy or not". At which point
the self-LART you keep describing becomes quite easy to comprehend, doesn't
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at