From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Lutomirski Subject: Re: RFC: renameat(): Add a RENAME_REMOVE flag to unlink hardlinks Date: Fri, 21 Nov 2014 17:51:23 -0800 Message-ID: References: <546F86F5.6070305@draigBrady.com> <546FA51F.40503@draigBrady.com> <546FAC18.5020200@redhat.com> <546FBAC6.6020407@draigBrady.com> <20141121223018.GV7996@ZenIV.linux.org.uk> <546FE6E1.7040703@draigBrady.com> <20141122015010.GW7996@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20141122015010.GW7996-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Al Viro Cc: =?UTF-8?Q?P=C3=A1draig_Brady?= , Eric Blake , Linux FS Devel , Linux API List-Id: linux-api@vger.kernel.org On Fri, Nov 21, 2014 at 5:50 PM, Al Viro wrot= e: > On Sat, Nov 22, 2014 at 01:29:05AM +0000, P=C3=A1draig Brady wrote: > >> > I assume that VFS can handle this correctly if it wants to. >> >> I was assuming there was a way to distinguish directory entries, >> and that's what should be checked first, which is what my >> psuedo code patch attempted to show. > > There isn't, in general. Sure, if you get the same struct dentry * f= rom > both lookups, it's the same one. But it's not guaranteed to be true = on > every fs out there if those are non-directories (and for directories = there's > no multiple hardlinks in the first place). Does that mean that the current behavior is inconsistent between filesy= stems. --=20 Andy Lutomirski AMA Capital Management, LLC