Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755608Ab3JHQFS (ORCPT ); Tue, 8 Oct 2013 12:05:18 -0400 Received: from mail-ea0-f181.google.com ([209.85.215.181]:48819 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753647Ab3JHQFP (ORCPT ); Tue, 8 Oct 2013 12:05:15 -0400 Date: Tue, 8 Oct 2013 18:06:01 +0200 From: Miklos Szeredi To: "Eric W. Biederman" Cc: Andy Lutomirski , "Serge E. Hallyn" , Al Viro , Linux-Fsdevel , Kernel Mailing List , Rob Landley , Linus Torvalds Subject: Re: [RFC][PATCH 4/3] vfs: Allow rmdir to remove mounts in all but the current mount namespace Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d2ngyb02.fsf@xmission.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1150 Lines: 31 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. Thanks, Miklos -- 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/