• Ian Kent's avatar
    autofs4: don't release directory mutex if called in oz_mode · c432c258
    Ian Kent authored
    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: default avatarIan Kent <raven@themaw.net>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    c432c258
root.c 28 KB