From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:38590 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751984AbeEMS4t (ORCPT ); Sun, 13 May 2018 14:56:49 -0400 Date: Sun, 13 May 2018 19:56:46 +0100 From: Al Viro To: Linus Torvalds Cc: linux-fsdevel , NeilBrown Subject: Re: [RFC][PATCH] fix breakage caused by d_find_alias() semantics change Message-ID: <20180513185646.GS30522@ZenIV.linux.org.uk> References: <20180513155158.GL30522@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, May 13, 2018 at 11:35:15AM -0700, Linus Torvalds wrote: > On Sun, May 13, 2018 at 9:18 AM Al Viro wrote: > > > /* Called from selinux_complete_init, try to find > a dentry. */ > > dentry = d_find_alias(inode); > > + if (!dentry) > > + dentry = d_find_any_alias(inode); > > Can you please explain why this isn't just > > dentry = d_find_any_alias(inode); > > without the initial "try to find a hashed alias"? The whole reason why that thing is getting a dentry is that some filesystems really want a *connected* dentry for getxattr. Sure, saner ones will be happy with disconnected dentry, but... If you want to rearchitect the shitpile under security/* so that it would not rely upon accidental properties of filesystems, you are welcome to that and to the resulting psychiatrist bills ;-/