]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
autofs4: don't release directory mutex if called in oz_mode
authorIan Kent <raven@themaw.net>
Thu, 24 Jul 2008 04:30:14 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:31 +0000 (10:47 -0700)
commitc432c2586a0811c7d0030d78f0993568bc889a6f
treeb5d711345120af6cc6ae67836d0773a5857e3e8c
parentef581a742874ebc4c28d24b374c78b762144ebdc
autofs4: don't release directory mutex if called in oz_mode

Since we now delay hashing of dentrys until the ->mkdir() call, droping
and re-taking the directory mutex within the ->lookup() function when we
are being called by user space is not needed.  This can lead to a race
when other processes are attempting to access the same directory during
mount point directory creation.

In this case we need to hang onto the mutex to ensure we don't get user
processes trying to create a mount request for a newly created dentry
after the mount point entry has already been created.  This ensures that
when we need to check a dentry passed to autofs4_wait(), if it is hashed,
it is always the mount point dentry and not a new dentry created by
another lookup during directory creation.

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/root.c