On Sun, May 13, 2018 at 11:35:15AM -0700, Linus Torvalds wrote: > On Sun, May 13, 2018 at 9:18 AM Al Viro <viro@xxxxxxxxxxxxxxxxxx> 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 ;-/