diff options
author | Nick Piggin <npiggin@suse.de> | 2010-01-29 15:38:32 -0800 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-04-27 17:32:51 +0200 |
commit | 2be75efa508e89528c173ea0eae71a29de040124 (patch) | |
tree | 3e6c553ce0e002b2b68ac631bfa697e211a07324 /fs | |
parent | 7e835af8566b68c0396256cdcb371f62e9cdb5fa (diff) | |
download | lwn-2be75efa508e89528c173ea0eae71a29de040124.tar.gz lwn-2be75efa508e89528c173ea0eae71a29de040124.zip |
fs-scale-pseudo
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.
XXX: is this right? I can't see any reason why they need to have a real
parent.
TODO: add a d_instantiate_something() and avoid adding the extra checks
for !d_parent
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/anon_inodes.c | 4 | ||||
-rw-r--r-- | fs/pipe.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 81f82e7e7290..c714d50eea79 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -105,9 +105,11 @@ struct file *anon_inode_getfile(const char *name, this.name = name; this.len = strlen(name); this.hash = 0; - path.dentry = d_alloc(anon_inode_mnt->mnt_sb->s_root, &this); + path.dentry = d_alloc(NULL, &this); if (!path.dentry) goto err_module; + path.dentry->d_parent = path.dentry; + path.dentry->d_flags |= DCACHE_DISCONNECTED; path.mnt = mntget(anon_inode_mnt); /* diff --git a/fs/pipe.c b/fs/pipe.c index a9dcf21a8871..4ef0fb045b6f 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -983,10 +983,12 @@ struct file *create_write_pipe(int flags) goto err; err = -ENOMEM; - path.dentry = d_alloc(pipe_mnt->mnt_sb->s_root, &name); + path.dentry = d_alloc(NULL, &name); if (!path.dentry) goto err_inode; path.mnt = mntget(pipe_mnt); + path.dentry->d_parent = path.dentry; + path.dentry->d_flags |= DCACHE_DISCONNECTED; path.dentry->d_op = &pipefs_dentry_operations; d_instantiate(path.dentry, inode); |