Commit 13e3c5e5 authored by Al Viro's avatar Al Viro
Browse files

clean DCACHE_CANT_MOUNT in d_delete()

We set the "it's dead, don't mount on it" flag _and_ do not remove it if
we turn the damn thing negative and leave it around.  And if it goes
positive afterwards, well...

Fortunately, there's only one place where that needs to be caught:
only d_delete() can turn the sucker negative without immediately freeing
it; all other places that can lead to ->d_iput() call are followed by
unconditionally freeing struct dentry in question.  So the fix is obvious:


Reported-by: default avatarAdam Tkac <>
Tested-by: default avatarAdam Tkac <>
Cc: <>         [2.6.34.x]
Signed-off-by: default avatarAl Viro <>
parent d515e86e
......@@ -1529,6 +1529,7 @@ void d_delete(struct dentry * dentry)
isdir = S_ISDIR(dentry->d_inode->i_mode);
if (atomic_read(&dentry->d_count) == 1) {
dentry->d_flags &= ~DCACHE_CANT_MOUNT;
fsnotify_nameremove(dentry, isdir);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment