diff --git a/[refs] b/[refs] index 5ab6b3e9b57f..fd429b6ad1b8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c826cb7dfce80512c26c984350077a25046bd215 +refs/heads/master: c83ce989cb5ff86575821992ea82c4df5c388ebc diff --git a/trunk/fs/dcache.c b/trunk/fs/dcache.c index 361882a14ccb..a39fe47c466f 100644 --- a/trunk/fs/dcache.c +++ b/trunk/fs/dcache.c @@ -296,8 +296,12 @@ static struct dentry *d_kill(struct dentry *dentry, struct dentry *parent) __releases(parent->d_lock) __releases(dentry->d_inode->i_lock) { - dentry->d_parent = NULL; list_del(&dentry->d_u.d_child); + /* + * Inform try_to_ascend() that we are no longer attached to the + * dentry tree + */ + dentry->d_flags |= DCACHE_DISCONNECTED; if (parent) spin_unlock(&parent->d_lock); dentry_iput(dentry); @@ -1030,6 +1034,7 @@ static struct dentry *try_to_ascend(struct dentry *old, int locked, unsigned seq * or deletion */ if (new != old->d_parent || + (old->d_flags & DCACHE_DISCONNECTED) || (!locked && read_seqretry(&rename_lock, seq))) { spin_unlock(&new->d_lock); new = NULL;