From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f169.google.com ([209.85.223.169]:35942 "EHLO mail-io0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757390AbdCUVOA (ORCPT ); Tue, 21 Mar 2017 17:14:00 -0400 MIME-Version: 1.0 In-Reply-To: References: <20170321184401.GA32507@vader> From: Linus Torvalds Date: Tue, 21 Mar 2017 14:06:15 -0700 Message-ID: Subject: Re: [RFC PATCH v2 1/2] fs: add AT_REPLACE flag for linkat() which replaces the target To: Miklos Szeredi Cc: Omar Sandoval , Al Viro , linux-fsdevel , Linux API , kernel-team , Xi Wang , Omar Sandoval Content-Type: text/plain; charset=UTF-8 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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