aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dcache.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index f2c042f1c..15b03546d 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -420,6 +420,23 @@ static inline bool d_is_su(const struct dentry *dentry)
!memcmp(dentry->d_name.name, "su", 2);
}
+/**
+ * d_inode - Get the actual inode of this dentry
+ * @dentry: The dentry to query
+ *
+ * This is the helper normal filesystems should use to get at their own inodes
+ * in their own dentries and ignore the layering superimposed upon them.
+ */
+static inline struct inode *d_inode(const struct dentry *dentry)
+{
+ return dentry->d_inode;
+}
+
+static inline bool d_is_negative(const struct dentry *dentry)
+{
+ return (dentry->d_inode == NULL);
+}
+
extern int sysctl_vfs_cache_pressure;
#endif /* __LINUX_DCACHE_H */