]> git.baikalelectronics.ru Git - kernel.git/commit
autofs4: don't make expiring dentry negative
authorIan Kent <raven@themaw.net>
Thu, 24 Jul 2008 04:30:09 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:31 +0000 (10:47 -0700)
commit2e4e738cf138777430febc93043c446403bca9e2
tree72f3aac56d49c7bea7940f8d8b6e8ca559e3ae1c
parent486897d0453c6dce72c195c5795471604c6a43e6
autofs4: don't make expiring dentry negative

Correct the error of making a positive dentry negative after it has been
instantiated.

The code that makes this error attempts to re-use the dentry from a
concurrent expire and mount to resolve a race and the dentry used for the
lookup must be negative for mounts to trigger in the required cases.  The
fact is that the dentry doesn't need to be re-used because all that is
needed is to preserve the flag that indicates an expire is still
incomplete at the time of the mount request.

This change uses the the dentry to check the flag and wait for the expire
to complete then discards it instead of attempting to re-use it.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/autofs4/autofs_i.h
fs/autofs4/inode.c
fs/autofs4/root.c