From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: Removing shared subtrees? Date: Tue, 30 Sep 2014 01:29:48 +0100 Message-ID: <20140930002948.GP7996@ZenIV.linux.org.uk> References: <20140930000924.GO7996@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux FS Devel , "linux-kernel@vger.kernel.org" , "Eric W. Biederman" To: Andy Lutomirski Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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 it?