Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756159Ab3JHQGy (ORCPT ); Tue, 8 Oct 2013 12:06:54 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:45125 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755545Ab3JHQGv (ORCPT ); Tue, 8 Oct 2013 12:06:51 -0400 MIME-Version: 1.0 In-Reply-To: <20131008160601.GJ14242@tucsk.piliscsaba.szeredi.hu> References: <87a9kkax0j.fsf@xmission.com> <8761v7h2pt.fsf@tw-ebiederman.twitter.com> <87li281wx6.fsf_-_@xmission.com> <87a9ioo37a.fsf_-_@xmission.com> <20131007043919.GB10284@mail.hallyn.com> <87vc191sf2.fsf@xmission.com> <87d2ngyb02.fsf@xmission.com> <20131008160601.GJ14242@tucsk.piliscsaba.szeredi.hu> From: Andy Lutomirski Date: Tue, 8 Oct 2013 09:06:29 -0700 Message-ID: Subject: Re: [RFC][PATCH 4/3] vfs: Allow rmdir to remove mounts in all but the current mount namespace To: Miklos Szeredi Cc: "Eric W. Biederman" , "Serge E. Hallyn" , Al Viro , Linux-Fsdevel , Kernel Mailing List , Rob Landley , Linus Torvalds Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1537 Lines: 47 On Tue, Oct 8, 2013 at 9:06 AM, Miklos Szeredi wrote: > On Mon, Oct 07, 2013 at 03:25:17PM -0700, Eric W. Biederman wrote: >> Andy Lutomirski writes: >> >> > On Mon, Oct 7, 2013 at 7:55 AM, Eric W. Biederman wrote: >> >> "Serge E. Hallyn" writes: >> >> >> >>> Quoting Eric W. Biederman (ebiederm@xmission.com): >> >>>> >> >>>> Programs have been known to test for empty directories by attempting >> >>>> to remove them. To keep from violating the principle of least >> >>>> surprise don't let directories the caller can see with someting >> >>>> mounted on them be deleted. >> >>> >> >>> Do you think we should do the same thing for over-mounted file at >> >>> vfs_unlink()? >> >> >> >> We easily could. > > And for vfs_rename()? > > I think the risks of changing behavior outweigh the benefits. How many times > did you have to remove or rename a mounted file or directory? It's very rarely > needed. I do this every time I reinstall a system while running that system. Admittedly, mount --move works, but that's a really unpleasant interface. When rename2 gets added, there could be a flag RENAME_MOVE_MOUNT to opt in. --Andy > > Thanks, > Miklos -- Andy Lutomirski AMA Capital Management, LLC -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/