提交 ec6e8c7d 编写于 作者: I Ian Kent 提交者: Linus Torvalds

autofs4: fix direct mount pending expire race - correction

Appologies, somehow I seem to have sent an out dated version of this
patch. Here is an additional patch that brings the patch up to date.
Signed-off-by: NIan Kent <raven@themaw.net>
Cc: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 6e60a9ab
...@@ -241,13 +241,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -241,13 +241,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
/* Follow down to our covering mount. */ /* Follow down to our covering mount. */
if (!follow_down(&nd->path.mnt, &nd->path.dentry)) if (!follow_down(&nd->path.mnt, &nd->path.dentry))
goto done; goto done;
/* goto follow;
* We shouldn't need to do this but we have no way
* of knowing what may have been done so try a follow
* just in case.
*/
autofs4_follow_mount(&nd->path.mnt, &nd->path.dentry);
goto done;
} }
spin_unlock(&sbi->fs_lock); spin_unlock(&sbi->fs_lock);
goto done; goto done;
...@@ -273,7 +267,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) ...@@ -273,7 +267,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd)
/* We trigger a mount for almost all flags */ /* We trigger a mount for almost all flags */
lookup_type = nd->flags & (TRIGGER_FLAGS | TRIGGER_INTENTS); lookup_type = nd->flags & (TRIGGER_FLAGS | TRIGGER_INTENTS);
if (!(lookup_type || dentry->d_flags & DCACHE_AUTOFS_PENDING)) if (!(lookup_type || dentry->d_flags & DCACHE_AUTOFS_PENDING))
goto done; goto follow;
/* /*
* If the dentry contains directories then it is an autofs * If the dentry contains directories then it is an autofs
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册