aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index c2add37082b6..67662beebc72 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1607,12 +1607,17 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)
1607} 1607}
1608EXPORT_SYMBOL(d_alloc); 1608EXPORT_SYMBOL(d_alloc);
1609 1609
1610/**
1611 * d_alloc_pseudo - allocate a dentry (for lookup-less filesystems)
1612 * @sb: the superblock
1613 * @name: qstr of the name
1614 *
1615 * For a filesystem that just pins its dentries in memory and never
1616 * performs lookups at all, return an unhashed IS_ROOT dentry.
1617 */
1610struct dentry *d_alloc_pseudo(struct super_block *sb, const struct qstr *name) 1618struct dentry *d_alloc_pseudo(struct super_block *sb, const struct qstr *name)
1611{ 1619{
1612 struct dentry *dentry = __d_alloc(sb, name); 1620 return __d_alloc(sb, name);
1613 if (dentry)
1614 dentry->d_flags |= DCACHE_DISCONNECTED;
1615 return dentry;
1616} 1621}
1617EXPORT_SYMBOL(d_alloc_pseudo); 1622EXPORT_SYMBOL(d_alloc_pseudo);
1618 1623