From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miklos Szeredi Subject: [PATCH 4.4 064/146] vfs: add d_real_inode() helper Date: Mon, 25 Jul 2016 13:55:19 -0700 Message-Id: <20160725203524.048849486@linuxfoundation.org> In-Reply-To: <20160725203521.340401316@linuxfoundation.org> References: <20160725203521.340401316@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Miklos Szeredi commit a118084432d642eeccb961c7c8cc61525a941fcb upstream. Needed by the following fix. Signed-off-by: Miklos Szeredi Signed-off-by: Greg Kroah-Hartman --- include/linux/dcache.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -603,5 +603,17 @@ static inline struct inode *vfs_select_i return inode; } +/** + * d_real_inode - Return the real inode + * @dentry: The dentry to query + * + * If dentry is on an union/overlay, then return the underlying, real inode. + * Otherwise return d_inode(). + */ +static inline struct inode *d_real_inode(struct dentry *dentry) +{ + return d_backing_inode(d_real(dentry)); +} + #endif /* __LINUX_DCACHE_H */