diff options
-rw-r--r-- | fs/autofs4/root.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 324290c68275..1e901e5ea013 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -686,12 +686,11 @@ static struct dentry *autofs4_lookup(struct inode *dir, struct dentry *dentry, s spin_lock(&dentry->d_lock); dentry->d_flags |= DCACHE_AUTOFS_PENDING; spin_unlock(&dentry->d_lock); - } - - if (dentry->d_op && dentry->d_op->d_revalidate) { - mutex_unlock(&dir->i_mutex); - (dentry->d_op->d_revalidate)(dentry, nd); - mutex_lock(&dir->i_mutex); + if (dentry->d_op && dentry->d_op->d_revalidate) { + mutex_unlock(&dir->i_mutex); + (dentry->d_op->d_revalidate)(dentry, nd); + mutex_lock(&dir->i_mutex); + } } /* |