]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] autofs4: NFY_NONE wait race fix
authorIan Kent <raven@themaw.net>
Mon, 15 May 2006 16:43:51 +0000 (09:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 15 May 2006 18:20:54 +0000 (11:20 -0700)
commit16e0b3cc3e0a7a965455063b5d9ce5235fde0eec
tree8a893bd5e6519fbb7e1b46506096607be7093a50
parentff5efc46b9d0c24fd16cb02b1d8451921bc8d43e
[PATCH] autofs4: NFY_NONE wait race fix

This patch fixes two problems.

First, the comparison of entries in the waitq.c was incorrect.

Second, the NFY_NONE check was incorrect. The test of whether the dentry
is mounted if ineffective, for example, if an expire fails then we could
wait forever on a non existant expire. The bug was identified by Jeff
Moyer.

The patch changes autofs4 to wait on expires only as this is all that's
needed.  If there is no existing wait when autofs4_wait is call with a type
of NFY_NONE it delays until either a wait appears or the the expire flag is
cleared.

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