Skip to content

Commit

Permalink
fix race in d_splice_alias()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Al Viro committed Mar 3, 2010
1 parent bec1052 commit 4919c5e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4919c5e

Please sign in to comment.