Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

autofs4: remove unused ioctls

The ioctls AUTOFS_IOC_TOGGLEREGHOST and AUTOFS_IOC_ASKREGHOST were added
several years ago but what they were intended for has never been
implemented (as far as I'm aware noone uses them) so remove them.

Signed-off-by: Ian Kent <raven@themaw.net>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Ian Kent and committed by
Linus Torvalds
aa55ddf3 06a35985

+1 -71
+1 -67
fs/autofs4/root.c
··· 25 25 static int autofs4_dir_mkdir(struct inode *,struct dentry *,int); 26 26 static int autofs4_root_ioctl(struct inode *, struct file *,unsigned int,unsigned long); 27 27 static int autofs4_dir_open(struct inode *inode, struct file *file); 28 - static int autofs4_root_readdir(struct file * filp, void * dirent, filldir_t filldir); 29 28 static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *); 30 29 static void *autofs4_follow_link(struct dentry *, struct nameidata *); 31 30 ··· 35 36 .open = dcache_dir_open, 36 37 .release = dcache_dir_close, 37 38 .read = generic_read_dir, 38 - .readdir = autofs4_root_readdir, 39 + .readdir = dcache_readdir, 39 40 .ioctl = autofs4_root_ioctl, 40 41 }; 41 42 ··· 69 70 .mkdir = autofs4_dir_mkdir, 70 71 .rmdir = autofs4_dir_rmdir, 71 72 }; 72 - 73 - static int autofs4_root_readdir(struct file *file, void *dirent, 74 - filldir_t filldir) 75 - { 76 - struct autofs_sb_info *sbi = autofs4_sbi(file->f_path.dentry->d_sb); 77 - int oz_mode = autofs4_oz_mode(sbi); 78 - 79 - DPRINTK("called, filp->f_pos = %lld", file->f_pos); 80 - 81 - /* 82 - * Don't set reghost flag if: 83 - * 1) f_pos is larger than zero -- we've already been here. 84 - * 2) we haven't even enabled reghosting in the 1st place. 85 - * 3) this is the daemon doing a readdir 86 - */ 87 - if (oz_mode && file->f_pos == 0 && sbi->reghost_enabled) 88 - sbi->needs_reghost = 1; 89 - 90 - DPRINTK("needs_reghost = %d", sbi->needs_reghost); 91 - 92 - return dcache_readdir(file, dirent, filldir); 93 - } 94 73 95 74 static int autofs4_dir_open(struct inode *inode, struct file *file) 96 75 { ··· 836 859 } 837 860 838 861 /* 839 - * Tells the daemon whether we need to reghost or not. Also, clears 840 - * the reghost_needed flag. 841 - */ 842 - static inline int autofs4_ask_reghost(struct autofs_sb_info *sbi, int __user *p) 843 - { 844 - int status; 845 - 846 - DPRINTK("returning %d", sbi->needs_reghost); 847 - 848 - status = put_user(sbi->needs_reghost, p); 849 - if (status) 850 - return status; 851 - 852 - sbi->needs_reghost = 0; 853 - return 0; 854 - } 855 - 856 - /* 857 - * Enable / Disable reghosting ioctl() operation 858 - */ 859 - static inline int autofs4_toggle_reghost(struct autofs_sb_info *sbi, int __user *p) 860 - { 861 - int status; 862 - int val; 863 - 864 - status = get_user(val, p); 865 - 866 - DPRINTK("reghost = %d", val); 867 - 868 - if (status) 869 - return status; 870 - 871 - /* turn on/off reghosting, with the val */ 872 - sbi->reghost_enabled = val; 873 - return 0; 874 - } 875 - 876 - /* 877 862 * Tells the daemon whether it can umount the autofs mount. 878 863 */ 879 864 static inline int autofs4_ask_umount(struct vfsmount *mnt, int __user *p) ··· 898 959 return autofs4_get_protosubver(sbi, p); 899 960 case AUTOFS_IOC_SETTIMEOUT: 900 961 return autofs4_get_set_timeout(sbi, p); 901 - 902 - case AUTOFS_IOC_TOGGLEREGHOST: 903 - return autofs4_toggle_reghost(sbi, p); 904 - case AUTOFS_IOC_ASKREGHOST: 905 - return autofs4_ask_reghost(sbi, p); 906 962 907 963 case AUTOFS_IOC_ASKUMOUNT: 908 964 return autofs4_ask_umount(filp->f_path.mnt, p);
-2
fs/compat_ioctl.c
··· 2297 2297 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE) 2298 2298 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI) 2299 2299 COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER) 2300 - COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST) 2301 - COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST) 2302 2300 COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) 2303 2301 /* Raw devices */ 2304 2302 COMPATIBLE_IOCTL(RAW_SETBIND)
-2
include/linux/auto_fs4.h
··· 98 98 #define AUTOFS_IOC_EXPIRE_INDIRECT AUTOFS_IOC_EXPIRE_MULTI 99 99 #define AUTOFS_IOC_EXPIRE_DIRECT AUTOFS_IOC_EXPIRE_MULTI 100 100 #define AUTOFS_IOC_PROTOSUBVER _IOR(0x93,0x67,int) 101 - #define AUTOFS_IOC_ASKREGHOST _IOR(0x93,0x68,int) 102 - #define AUTOFS_IOC_TOGGLEREGHOST _IOR(0x93,0x69,int) 103 101 #define AUTOFS_IOC_ASKUMOUNT _IOR(0x93,0x70,int) 104 102 105 103