aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-03-03 14:13:08 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-03-03 14:13:08 -0500
commit4919c5e45a91b5db5a41695fe0357fbdff0d5767 (patch)
tree1aec0bdee83753205be2a6bbe0486db08984f938 /fs/dcache.c
parentbec1052e5be6a70f03f6adc650f3a6e4c2f44ddf (diff)
fix race in d_splice_alias()
rehashing the negative placeholder opens a race with d_lookup(); we unhash it almost immediately (by d_move()), but the race window is there. Since d_move() doesn't rely on target being hashed, we don't need that d_rehash() at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 74da947b160b..f1358e5c3a59 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1222,7 +1222,6 @@ struct dentry *d_splice_alias(struct inode *inode, struct dentry *dentry)
1222 BUG_ON(!(new->d_flags & DCACHE_DISCONNECTED)); 1222 BUG_ON(!(new->d_flags & DCACHE_DISCONNECTED));
1223 spin_unlock(&dcache_lock); 1223 spin_unlock(&dcache_lock);
1224 security_d_instantiate(new, inode); 1224 security_d_instantiate(new, inode);
1225 d_rehash(dentry);
1226 d_move(new, dentry); 1225 d_move(new, dentry);
1227 iput(inode); 1226 iput(inode);
1228 } else { 1227 } else {