From: Miklos Szeredi Date: Fri, 20 May 2016 20:13:45 +0000 (+0200) Subject: vfs: add d_real_inode() helper X-Git-Tag: v4.14-rc1~3022^2~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a118084432d642eeccb961c7c8cc61525a941fcb;p=platform%2Fkernel%2Flinux-rpi.git vfs: add d_real_inode() helper Needed by the following fix. Signed-off-by: Miklos Szeredi Cc: --- diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 7e9422c..ad5d582 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -576,5 +576,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry, 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 */