aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 01:49:32 -0500
committerNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:21 -0500
commitb7ab39f631f505edc2bbdb86620d5493f995c9da (patch)
tree62be97ebc7fc69ceb601f23312d335ebb8038ee7 /fs/coda
parent2304450783dfde7b0b94ae234edd0dbffa865073 (diff)
fs: dcache scale dentry refcount
Make d_count non-atomic and protect it with d_lock. This allows us to ensure a 0 refcount dentry remains 0 without dcache_lock. It is also fairly natural when we start protecting many other dentry members with d_lock. Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/coda')
-rw-r--r--fs/coda/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index 4cce3b07d9d7..9e37e8bc9b89 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -559,7 +559,7 @@ static int coda_dentry_revalidate(struct dentry *de, struct nameidata *nd)
559 if (cii->c_flags & C_FLUSH) 559 if (cii->c_flags & C_FLUSH)
560 coda_flag_inode_children(inode, C_FLUSH); 560 coda_flag_inode_children(inode, C_FLUSH);
561 561
562 if (atomic_read(&de->d_count) > 1) 562 if (de->d_count > 1)
563 /* pretend it's valid, but don't change the flags */ 563 /* pretend it's valid, but don't change the flags */
564 goto out; 564 goto out;
565 565