diff options
author | Ian Kent <ikent@redhat.com> | 2016-11-23 16:03:42 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-12-03 20:51:48 -0500 |
commit | dd36a882e7ade2c642f8711426ad8e4b7009aaae (patch) | |
tree | 3d64641e78b2926cb8089494ccdb10f19e033f40 /fs/autofs4/root.c | |
parent | 74f504cff50b918f8ec2762b1513ae755da56a95 (diff) |
autofs: change autofs4_wait() to take struct path
In order to use the functions path_is_mountpoint() and path_has_submounts()
autofs needs to pass a struct path in several places.
Now change autofs4_wait() to take a struct path instead of a struct
dentry.
Link: http://lkml.kernel.org/r/20161011053413.27645.84666.stgit@pluto.themaw.net
Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r-- | fs/autofs4/root.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index 6b06337ca9fc..0e9881552881 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -269,17 +269,17 @@ next: | |||
269 | return NULL; | 269 | return NULL; |
270 | } | 270 | } |
271 | 271 | ||
272 | static int autofs4_mount_wait(struct dentry *dentry, bool rcu_walk) | 272 | static int autofs4_mount_wait(const struct path *path, bool rcu_walk) |
273 | { | 273 | { |
274 | struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); | 274 | struct autofs_sb_info *sbi = autofs4_sbi(path->dentry->d_sb); |
275 | struct autofs_info *ino = autofs4_dentry_ino(dentry); | 275 | struct autofs_info *ino = autofs4_dentry_ino(path->dentry); |
276 | int status = 0; | 276 | int status = 0; |
277 | 277 | ||
278 | if (ino->flags & AUTOFS_INF_PENDING) { | 278 | if (ino->flags & AUTOFS_INF_PENDING) { |
279 | if (rcu_walk) | 279 | if (rcu_walk) |
280 | return -ECHILD; | 280 | return -ECHILD; |
281 | pr_debug("waiting for mount name=%pd\n", dentry); | 281 | pr_debug("waiting for mount name=%pd\n", path->dentry); |
282 | status = autofs4_wait(sbi, dentry, NFY_MOUNT); | 282 | status = autofs4_wait(sbi, path, NFY_MOUNT); |
283 | pr_debug("mount wait done status=%d\n", status); | 283 | pr_debug("mount wait done status=%d\n", status); |
284 | } | 284 | } |
285 | ino->last_used = jiffies; | 285 | ino->last_used = jiffies; |
@@ -364,7 +364,7 @@ static struct vfsmount *autofs4_d_automount(struct path *path) | |||
364 | spin_lock(&sbi->fs_lock); | 364 | spin_lock(&sbi->fs_lock); |
365 | if (ino->flags & AUTOFS_INF_PENDING) { | 365 | if (ino->flags & AUTOFS_INF_PENDING) { |
366 | spin_unlock(&sbi->fs_lock); | 366 | spin_unlock(&sbi->fs_lock); |
367 | status = autofs4_mount_wait(dentry, 0); | 367 | status = autofs4_mount_wait(path, 0); |
368 | if (status) | 368 | if (status) |
369 | return ERR_PTR(status); | 369 | return ERR_PTR(status); |
370 | goto done; | 370 | goto done; |
@@ -405,7 +405,7 @@ static struct vfsmount *autofs4_d_automount(struct path *path) | |||
405 | } | 405 | } |
406 | ino->flags |= AUTOFS_INF_PENDING; | 406 | ino->flags |= AUTOFS_INF_PENDING; |
407 | spin_unlock(&sbi->fs_lock); | 407 | spin_unlock(&sbi->fs_lock); |
408 | status = autofs4_mount_wait(dentry, 0); | 408 | status = autofs4_mount_wait(path, 0); |
409 | spin_lock(&sbi->fs_lock); | 409 | spin_lock(&sbi->fs_lock); |
410 | ino->flags &= ~AUTOFS_INF_PENDING; | 410 | ino->flags &= ~AUTOFS_INF_PENDING; |
411 | if (status) { | 411 | if (status) { |
@@ -447,7 +447,7 @@ static int autofs4_d_manage(const struct path *path, bool rcu_walk) | |||
447 | * This dentry may be under construction so wait on mount | 447 | * This dentry may be under construction so wait on mount |
448 | * completion. | 448 | * completion. |
449 | */ | 449 | */ |
450 | status = autofs4_mount_wait(dentry, rcu_walk); | 450 | status = autofs4_mount_wait(path, rcu_walk); |
451 | if (status) | 451 | if (status) |
452 | return status; | 452 | return status; |
453 | 453 | ||