]> git.baikalelectronics.ru Git - kernel.git/commit
clean DCACHE_CANT_MOUNT in d_delete()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 21 May 2010 20:11:04 +0000 (16:11 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 21 May 2010 22:31:12 +0000 (18:31 -0400)
commita14022ce9b8b5f6e8a95a88764c0a843410755ab
tree18222526565a7fdf44aba30d2861c1f6b75516e3
parente3a106ec272dbf24b73b2f7d13b1fc01a93e1d55
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:

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16014
Reported-by: Adam Tkac <vonsch@gmail.com>
Tested-by: Adam Tkac <vonsch@gmail.com>
Cc: <stable@kernel.org> [2.6.34.x]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c