|
@@ -1607,12 +1607,17 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)
|
|
|
}
|
|
|
EXPORT_SYMBOL(d_alloc);
|
|
|
|
|
|
+/**
|
|
|
+ * d_alloc_pseudo - allocate a dentry (for lookup-less filesystems)
|
|
|
+ * @sb: the superblock
|
|
|
+ * @name: qstr of the name
|
|
|
+ *
|
|
|
+ * For a filesystem that just pins its dentries in memory and never
|
|
|
+ * performs lookups at all, return an unhashed IS_ROOT dentry.
|
|
|
+ */
|
|
|
struct dentry *d_alloc_pseudo(struct super_block *sb, const struct qstr *name)
|
|
|
{
|
|
|
- struct dentry *dentry = __d_alloc(sb, name);
|
|
|
- if (dentry)
|
|
|
- dentry->d_flags |= DCACHE_DISCONNECTED;
|
|
|
- return dentry;
|
|
|
+ return __d_alloc(sb, name);
|
|
|
}
|
|
|
EXPORT_SYMBOL(d_alloc_pseudo);
|
|
|
|