@@ -180,7 +180,7 @@ static int autofs_dev_ioctl_protover(struct file *fp,
180180 struct autofs_sb_info * sbi ,
181181 struct autofs_dev_ioctl * param )
182182{
183- param -> arg1 = sbi -> version ;
183+ param -> protover . version = sbi -> version ;
184184 return 0 ;
185185}
186186
@@ -189,7 +189,7 @@ static int autofs_dev_ioctl_protosubver(struct file *fp,
189189 struct autofs_sb_info * sbi ,
190190 struct autofs_dev_ioctl * param )
191191{
192- param -> arg1 = sbi -> sub_version ;
192+ param -> protosubver . sub_version = sbi -> sub_version ;
193193 return 0 ;
194194}
195195
@@ -335,13 +335,13 @@ static int autofs_dev_ioctl_openmount(struct file *fp,
335335 int err , fd ;
336336
337337 /* param->path has already been checked */
338- if (!param -> arg1 )
338+ if (!param -> openmount . devid )
339339 return - EINVAL ;
340340
341341 param -> ioctlfd = -1 ;
342342
343343 path = param -> path ;
344- devid = param -> arg1 ;
344+ devid = param -> openmount . devid ;
345345
346346 err = 0 ;
347347 fd = autofs_dev_ioctl_open_mountpoint (path , devid );
@@ -373,7 +373,7 @@ static int autofs_dev_ioctl_ready(struct file *fp,
373373{
374374 autofs_wqt_t token ;
375375
376- token = (autofs_wqt_t ) param -> arg1 ;
376+ token = (autofs_wqt_t ) param -> ready . token ;
377377 return autofs4_wait_release (sbi , token , 0 );
378378}
379379
@@ -388,8 +388,8 @@ static int autofs_dev_ioctl_fail(struct file *fp,
388388 autofs_wqt_t token ;
389389 int status ;
390390
391- token = (autofs_wqt_t ) param -> arg1 ;
392- status = param -> arg2 ? param -> arg2 : - ENOENT ;
391+ token = (autofs_wqt_t ) param -> fail . token ;
392+ status = param -> fail . status ? param -> fail . status : - ENOENT ;
393393 return autofs4_wait_release (sbi , token , status );
394394}
395395
@@ -412,10 +412,10 @@ static int autofs_dev_ioctl_setpipefd(struct file *fp,
412412 int pipefd ;
413413 int err = 0 ;
414414
415- if (param -> arg1 == -1 )
415+ if (param -> setpipefd . pipefd == -1 )
416416 return - EINVAL ;
417417
418- pipefd = param -> arg1 ;
418+ pipefd = param -> setpipefd . pipefd ;
419419
420420 mutex_lock (& sbi -> wq_mutex );
421421 if (!sbi -> catatonic ) {
@@ -457,8 +457,8 @@ static int autofs_dev_ioctl_timeout(struct file *fp,
457457{
458458 unsigned long timeout ;
459459
460- timeout = param -> arg1 ;
461- param -> arg1 = sbi -> exp_timeout / HZ ;
460+ timeout = param -> timeout . timeout ;
461+ param -> timeout . timeout = sbi -> exp_timeout / HZ ;
462462 sbi -> exp_timeout = timeout * HZ ;
463463 return 0 ;
464464}
@@ -489,7 +489,7 @@ static int autofs_dev_ioctl_requester(struct file *fp,
489489 path = param -> path ;
490490 devid = sbi -> sb -> s_dev ;
491491
492- param -> arg1 = param -> arg2 = -1 ;
492+ param -> requester . uid = param -> requester . gid = -1 ;
493493
494494 /* Get nameidata of the parent directory */
495495 err = path_lookup (path , LOOKUP_PARENT , & nd );
@@ -505,8 +505,8 @@ static int autofs_dev_ioctl_requester(struct file *fp,
505505 err = 0 ;
506506 autofs4_expire_wait (nd .path .dentry );
507507 spin_lock (& sbi -> fs_lock );
508- param -> arg1 = ino -> uid ;
509- param -> arg2 = ino -> gid ;
508+ param -> requester . uid = ino -> uid ;
509+ param -> requester . gid = ino -> gid ;
510510 spin_unlock (& sbi -> fs_lock );
511511 }
512512
@@ -529,7 +529,7 @@ static int autofs_dev_ioctl_expire(struct file *fp,
529529 int err = - EAGAIN ;
530530 int how ;
531531
532- how = param -> arg1 ;
532+ how = param -> expire . how ;
533533 mnt = fp -> f_path .mnt ;
534534
535535 if (sbi -> type & AUTOFS_TYPE_TRIGGER )
@@ -565,9 +565,9 @@ static int autofs_dev_ioctl_askumount(struct file *fp,
565565 struct autofs_sb_info * sbi ,
566566 struct autofs_dev_ioctl * param )
567567{
568- param -> arg1 = 0 ;
568+ param -> askumount . may_umount = 0 ;
569569 if (may_umount (fp -> f_path .mnt ))
570- param -> arg1 = 1 ;
570+ param -> askumount . may_umount = 1 ;
571571 return 0 ;
572572}
573573
@@ -600,6 +600,7 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
600600 struct nameidata nd ;
601601 const char * path ;
602602 unsigned int type ;
603+ unsigned int devid , magic ;
603604 int err = - ENOENT ;
604605
605606 if (param -> size <= sizeof (* param )) {
@@ -608,10 +609,10 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
608609 }
609610
610611 path = param -> path ;
611- type = param -> arg1 ;
612+ type = param -> ismountpoint . in . type ;
612613
613- param -> arg1 = 0 ;
614- param -> arg2 = 0 ;
614+ param -> ismountpoint . out . devid = devid = 0 ;
615+ param -> ismountpoint . out . magic = magic = 0 ;
615616
616617 if (!fp || param -> ioctlfd == -1 ) {
617618 if (type == AUTOFS_TYPE_ANY ) {
@@ -622,7 +623,7 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
622623 goto out ;
623624
624625 sb = nd .path .dentry -> d_sb ;
625- param -> arg1 = new_encode_dev (sb -> s_dev );
626+ devid = new_encode_dev (sb -> s_dev );
626627 } else {
627628 struct autofs_info * ino ;
628629
@@ -635,14 +636,14 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
635636 goto out_release ;
636637
637638 ino = autofs4_dentry_ino (nd .path .dentry );
638- param -> arg1 = autofs4_get_dev (ino -> sbi );
639+ devid = autofs4_get_dev (ino -> sbi );
639640 }
640641
641642 err = 0 ;
642643 if (nd .path .dentry -> d_inode &&
643644 nd .path .mnt -> mnt_root == nd .path .dentry ) {
644645 err = 1 ;
645- param -> arg2 = nd .path .dentry -> d_inode -> i_sb -> s_magic ;
646+ magic = nd .path .dentry -> d_inode -> i_sb -> s_magic ;
646647 }
647648 } else {
648649 dev_t devid = new_encode_dev (sbi -> sb -> s_dev );
@@ -655,18 +656,21 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
655656 if (err )
656657 goto out_release ;
657658
658- param -> arg1 = autofs4_get_dev (sbi );
659+ devid = autofs4_get_dev (sbi );
659660
660661 err = have_submounts (nd .path .dentry );
661662
662663 if (nd .path .mnt -> mnt_mountpoint != nd .path .mnt -> mnt_root ) {
663664 if (follow_down (& nd .path .mnt , & nd .path .dentry )) {
664665 struct inode * inode = nd .path .dentry -> d_inode ;
665- param -> arg2 = inode -> i_sb -> s_magic ;
666+ magic = inode -> i_sb -> s_magic ;
666667 }
667668 }
668669 }
669670
671+ param -> ismountpoint .out .devid = devid ;
672+ param -> ismountpoint .out .magic = magic ;
673+
670674out_release :
671675 path_put (& nd .path );
672676out :
0 commit comments