RFC: FROMLIST: locking/percpu-rwsem: Optimize readers and reduce global impact
[firefly-linux-kernel-4.4.55.git] / include / linux / dcache.h
index 71ff59b66dc4ef3fb28456a09ba548d30f31d5a7..702b6c53c12ff5bcfcd0bb8d41340fb035edb625 100644 (file)
@@ -604,5 +604,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 */