From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [RFC PATCH v2 1/2] fs: add AT_REPLACE flag for linkat() which replaces the target Date: Tue, 21 Mar 2017 14:06:15 -0700 Message-ID: References: <20170321184401.GA32507@vader> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org To: Miklos Szeredi Cc: Omar Sandoval , Al Viro , linux-fsdevel , Linux API , kernel-team , Xi Wang , Omar Sandoval List-Id: linux-api@vger.kernel.org On Tue, Mar 21, 2017 at 1:37 PM, Miklos Szeredi wrote: > > What overlayfs issues? Overlayfs behaves exactly like a normal > filesystem wrt negative dentries. Ignore me. I did indeed just confuse whiteouts with the normal negative dentries. > I think this is historic. may_delete() was doing the same as > may_create() and more. Doesn't look like that's still strictly true, > so it might make sense to add a may_replace() operation that does > both. They are definitely very different these days, with may_create() requiring a valid UID mapping into the filesystem, for example. That may make no sense for the move/link case, of course (since the uid comes from the source file, not the current process), so it is possible that may_delete() ends up being effectively a superset of the may_create() things apart from that one thing, of course. The one noticeable difference would seem to be the audit difference. Maybe nobody cares. Linus