aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/root.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r--fs/autofs4/root.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 0e9881552881..9355608cb495 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -123,7 +123,7 @@ static int autofs4_dir_open(struct inode *inode, struct file *file)
123 * it. 123 * it.
124 */ 124 */
125 spin_lock(&sbi->lookup_lock); 125 spin_lock(&sbi->lookup_lock);
126 if (!d_mountpoint(dentry) && simple_empty(dentry)) { 126 if (!path_is_mountpoint(&file->f_path) && simple_empty(dentry)) {
127 spin_unlock(&sbi->lookup_lock); 127 spin_unlock(&sbi->lookup_lock);
128 return -ENOENT; 128 return -ENOENT;
129 } 129 }
@@ -372,15 +372,15 @@ static struct vfsmount *autofs4_d_automount(struct path *path)
372 372
373 /* 373 /*
374 * If the dentry is a symlink it's equivalent to a directory 374 * If the dentry is a symlink it's equivalent to a directory
375 * having d_mountpoint() true, so there's no need to call back 375 * having path_is_mountpoint() true, so there's no need to call
376 * to the daemon. 376 * back to the daemon.
377 */ 377 */
378 if (d_really_is_positive(dentry) && d_is_symlink(dentry)) { 378 if (d_really_is_positive(dentry) && d_is_symlink(dentry)) {
379 spin_unlock(&sbi->fs_lock); 379 spin_unlock(&sbi->fs_lock);
380 goto done; 380 goto done;
381 } 381 }
382 382
383 if (!d_mountpoint(dentry)) { 383 if (!path_is_mountpoint(path)) {
384 /* 384 /*
385 * It's possible that user space hasn't removed directories 385 * It's possible that user space hasn't removed directories
386 * after umounting a rootless multi-mount, although it 386 * after umounting a rootless multi-mount, although it
@@ -434,7 +434,7 @@ static int autofs4_d_manage(const struct path *path, bool rcu_walk)
434 434
435 /* The daemon never waits. */ 435 /* The daemon never waits. */
436 if (autofs4_oz_mode(sbi)) { 436 if (autofs4_oz_mode(sbi)) {
437 if (!d_mountpoint(dentry)) 437 if (!path_is_mountpoint(path))
438 return -EISDIR; 438 return -EISDIR;
439 return 0; 439 return 0;
440 } 440 }
@@ -463,7 +463,7 @@ static int autofs4_d_manage(const struct path *path, bool rcu_walk)
463 463
464 if (ino->flags & AUTOFS_INF_WANT_EXPIRE) 464 if (ino->flags & AUTOFS_INF_WANT_EXPIRE)
465 return 0; 465 return 0;
466 if (d_mountpoint(dentry)) 466 if (path_is_mountpoint(path))
467 return 0; 467 return 0;
468 inode = d_inode_rcu(dentry); 468 inode = d_inode_rcu(dentry);
469 if (inode && S_ISLNK(inode->i_mode)) 469 if (inode && S_ISLNK(inode->i_mode))
@@ -490,7 +490,7 @@ static int autofs4_d_manage(const struct path *path, bool rcu_walk)
490 * we can avoid needless calls ->d_automount() and avoid 490 * we can avoid needless calls ->d_automount() and avoid
491 * an incorrect ELOOP error return. 491 * an incorrect ELOOP error return.
492 */ 492 */
493 if ((!d_mountpoint(dentry) && !simple_empty(dentry)) || 493 if ((!path_is_mountpoint(path) && !simple_empty(dentry)) ||
494 (d_really_is_positive(dentry) && d_is_symlink(dentry))) 494 (d_really_is_positive(dentry) && d_is_symlink(dentry)))
495 status = -EISDIR; 495 status = -EISDIR;
496 } 496 }