aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/expire.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/autofs4/expire.c')
-rw-r--r--fs/autofs4/expire.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
index e3bd50776f9e..75f7ddacf7d6 100644
--- a/fs/autofs4/expire.c
+++ b/fs/autofs4/expire.c
@@ -478,22 +478,16 @@ int autofs4_expire_run(struct super_block *sb,
478 return ret; 478 return ret;
479} 479}
480 480
481/* Call repeatedly until it returns -EAGAIN, meaning there's nothing 481int autofs4_do_expire_multi(struct super_block *sb, struct vfsmount *mnt,
482 more to be done */ 482 struct autofs_sb_info *sbi, int when)
483int autofs4_expire_multi(struct super_block *sb, struct vfsmount *mnt,
484 struct autofs_sb_info *sbi, int __user *arg)
485{ 483{
486 struct dentry *dentry; 484 struct dentry *dentry;
487 int ret = -EAGAIN; 485 int ret = -EAGAIN;
488 int do_now = 0;
489
490 if (arg && get_user(do_now, arg))
491 return -EFAULT;
492 486
493 if (autofs_type_trigger(sbi->type)) 487 if (autofs_type_trigger(sbi->type))
494 dentry = autofs4_expire_direct(sb, mnt, sbi, do_now); 488 dentry = autofs4_expire_direct(sb, mnt, sbi, when);
495 else 489 else
496 dentry = autofs4_expire_indirect(sb, mnt, sbi, do_now); 490 dentry = autofs4_expire_indirect(sb, mnt, sbi, when);
497 491
498 if (dentry) { 492 if (dentry) {
499 struct autofs_info *ino = autofs4_dentry_ino(dentry); 493 struct autofs_info *ino = autofs4_dentry_ino(dentry);
@@ -516,3 +510,16 @@ int autofs4_expire_multi(struct super_block *sb, struct vfsmount *mnt,
516 return ret; 510 return ret;
517} 511}
518 512
513/* Call repeatedly until it returns -EAGAIN, meaning there's nothing
514 more to be done */
515int autofs4_expire_multi(struct super_block *sb, struct vfsmount *mnt,
516 struct autofs_sb_info *sbi, int __user *arg)
517{
518 int do_now = 0;
519
520 if (arg && get_user(do_now, arg))
521 return -EFAULT;
522
523 return autofs4_do_expire_multi(sb, mnt, sbi, do_now);
524}
525