diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 22:13:08 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 22:13:08 +0300 |
commit | 4919c5e45a91b5db5a41695fe0357fbdff0d5767 (patch) | |
tree | 1aec0bdee83753205be2a6bbe0486db08984f938 /fs/dcache.c | |
parent | bec1052e5be6a70f03f6adc650f3a6e4c2f44ddf (diff) | |
download | linux-4919c5e45a91b5db5a41695fe0357fbdff0d5767.tar.xz |
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.c | 1 |
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) BUG_ON(!(new->d_flags & DCACHE_DISCONNECTED)); spin_unlock(&dcache_lock); security_d_instantiate(new, inode); - d_rehash(dentry); d_move(new, dentry); iput(inode); } else { |