aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:07 -0500
committerNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:32 -0500
commit4b936885ab04dc6e0bb0ef35e0e23c1a7364d9e5 (patch)
treea0173d27c1ce39f173be404d269c2f15144072ab /fs/dcache.c
parent873feea09ebc980cbd3631b767356ce1eee65ec1 (diff)
fs: improve scalability of pseudo filesystems
Regardless of how much we possibly try to scale dcache, there is likely always going to be some fundamental contention when adding or removing children under the same parent. Pseudo filesystems do not seem need to have connected dentries because by definition they are disconnected. Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 09ec945f3c98..9e6e6db76869 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1330,6 +1330,18 @@ struct dentry *d_alloc(struct dentry * parent, const struct qstr *name)
1330} 1330}
1331EXPORT_SYMBOL(d_alloc); 1331EXPORT_SYMBOL(d_alloc);
1332 1332
1333struct dentry *d_alloc_pseudo(struct super_block *sb, const struct qstr *name)
1334{
1335 struct dentry *dentry = d_alloc(NULL, name);
1336 if (dentry) {
1337 dentry->d_sb = sb;
1338 dentry->d_parent = dentry;
1339 dentry->d_flags |= DCACHE_DISCONNECTED;
1340 }
1341 return dentry;
1342}
1343EXPORT_SYMBOL(d_alloc_pseudo);
1344
1333struct dentry *d_alloc_name(struct dentry *parent, const char *name) 1345struct dentry *d_alloc_name(struct dentry *parent, const char *name)
1334{ 1346{
1335 struct qstr q; 1347 struct qstr q;