From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:34477 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbcD3RZd (ORCPT ); Sat, 30 Apr 2016 13:25:33 -0400 Date: Sat, 30 Apr 2016 18:25:31 +0100 From: Al Viro To: Greg Kroah-Hartman Cc: Andreas Gruenbacher , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 3/5] kernfs: Switch to generic xattr handlers Message-ID: <20160430172531.GB25498@ZenIV.linux.org.uk> References: <1461939517-15497-1-git-send-email-agruenba@redhat.com> <1461939517-15497-4-git-send-email-agruenba@redhat.com> <20160430170231.GA30451@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160430170231.GA30451@kroah.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sat, Apr 30, 2016 at 10:02:31AM -0700, Greg Kroah-Hartman wrote: > On Fri, Apr 29, 2016 at 04:18:35PM +0200, Andreas Gruenbacher wrote: > > Unlike with most other filesystems, xattrs in kernfs are attached to the > > dentries (dentry->d_fsdata). Once security modules start calling get > > xattr handlers with a NULL dentry (because of an unknown dentry), we'll > > have to start check for that in kernfs_xattr_get. > > > > Signed-off-by: Andreas Gruenbacher > > Cc: Greg Kroah-Hartman > > Note, I'm not the only maintainer of kernfs... > > Anyway: > Acked-by: Greg Kroah-Hartman Guys, kernfs uses ->d_fsdata to get to them, but note static void kernfs_init_inode(struct kernfs_node *kn, struct inode *inode) { kernfs_get(kn); inode->i_private = kn; IOW, inode->i_private would work just as well - it points to the same thing.