aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/dev-ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/dev-ioctl.c')
-rw-r--r--fs/autofs4/dev-ioctl.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index 025e105bffea..9e5ae8a4f5c8 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -525,40 +525,13 @@ static int autofs_dev_ioctl_expire(struct file *fp,
525 struct autofs_sb_info *sbi, 525 struct autofs_sb_info *sbi,
526 struct autofs_dev_ioctl *param) 526 struct autofs_dev_ioctl *param)
527{ 527{
528 struct dentry *dentry;
529 struct vfsmount *mnt; 528 struct vfsmount *mnt;
530 int err = -EAGAIN;
531 int how; 529 int how;
532 530
533 how = param->expire.how; 531 how = param->expire.how;
534 mnt = fp->f_path.mnt; 532 mnt = fp->f_path.mnt;
535 533
536 if (autofs_type_trigger(sbi->type)) 534 return autofs4_do_expire_multi(sbi->sb, mnt, sbi, how);
537 dentry = autofs4_expire_direct(sbi->sb, mnt, sbi, how);
538 else
539 dentry = autofs4_expire_indirect(sbi->sb, mnt, sbi, how);
540
541 if (dentry) {
542 struct autofs_info *ino = autofs4_dentry_ino(dentry);
543
544 /*
545 * This is synchronous because it makes the daemon a
546 * little easier
547 */
548 err = autofs4_wait(sbi, dentry, NFY_EXPIRE);
549
550 spin_lock(&sbi->fs_lock);
551 if (ino->flags & AUTOFS_INF_MOUNTPOINT) {
552 ino->flags &= ~AUTOFS_INF_MOUNTPOINT;
553 sbi->sb->s_root->d_mounted++;
554 }
555 ino->flags &= ~AUTOFS_INF_EXPIRING;
556 complete_all(&ino->expire_complete);
557 spin_unlock(&sbi->fs_lock);
558 dput(dentry);
559 }
560
561 return err;
562} 535}
563 536
564/* Check if autofs mount point is in use */ 537/* Check if autofs mount point is in use */