summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-06-12 13:05:21 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2016-06-12 13:05:21 +0300
commit30402c8949934fbaca07d9c20074d0d7a5a8385f (patch)
treef63ddb91f4bed559358c2478f61718a5b23f99b1 /include/linux
parentb581755b1c565391c72d03b157ba2dd0b18e9d15 (diff)
parenteb0a4a47ae89aaa0674ab3180de6a162f3be2ddf (diff)
downloadlinux-30402c8949934fbaca07d9c20074d0d7a5a8385f.tar.xz
Merge branch 'overlayfs-af_unix-fix' into overlayfs-linus
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dcache.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index 484c8792da82..f28100f6b556 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -575,5 +575,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 */