dcache: extrace and use d_unlinked()
[linux-block.git] / include / linux / dcache.h
index 72ce2ae88591e9ad1fc6681ac8d205dab9dff1b5..30b93b2a01a42891c78ae54f6803f0908c544b7f 100644 (file)
@@ -353,6 +353,11 @@ static inline int d_unhashed(struct dentry *dentry)
        return (dentry->d_flags & DCACHE_UNHASHED);
 }
 
+static inline int d_unlinked(struct dentry *dentry)
+{
+       return d_unhashed(dentry) && !IS_ROOT(dentry);
+}
+
 static inline struct dentry *dget_parent(struct dentry *dentry)
 {
        struct dentry *ret;