aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/dcache.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 8bdae36a095f..8c09db9bb2a4 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2676,9 +2676,14 @@ struct dentry *d_splice_alias(struct inode *inode, struct dentry *dentry)
2676 new = __d_find_alias(inode, 1); 2676 new = __d_find_alias(inode, 1);
2677 if (new) { 2677 if (new) {
2678 BUG_ON(!(new->d_flags & DCACHE_DISCONNECTED)); 2678 BUG_ON(!(new->d_flags & DCACHE_DISCONNECTED));
2679 write_seqlock(&rename_lock);
2680 __d_materialise_dentry(dentry, new);
2681 write_sequnlock(&rename_lock);
2682 __d_drop(new);
2683 _d_rehash(new);
2684 spin_unlock(&new->d_lock);
2679 spin_unlock(&inode->i_lock); 2685 spin_unlock(&inode->i_lock);
2680 security_d_instantiate(new, inode); 2686 security_d_instantiate(new, inode);
2681 d_move(new, dentry);
2682 iput(inode); 2687 iput(inode);
2683 } else { 2688 } else {
2684 /* already taking inode->i_lock, so d_add() by hand */ 2689 /* already taking inode->i_lock, so d_add() by hand */