aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2008-07-24 00:30:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:33 -0400
commitaa55ddf340c9fa3f303ee16bbf35887e42c50304 (patch)
tree62194eef352ef852e6da1a9a3b685d2f56ac9c3b /fs
parent06a3598552dc3b2b30eb18bd53bbac2a901489d7 (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/autofs4/root.c68
-rw-r--r--fs/compat_ioctl.c2
2 files changed, 1 insertions, 69 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index ae22bde0bbd7..bcfb2dc0a61b 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -25,7 +25,6 @@ static int autofs4_dir_rmdir(struct inode *,struct dentry *);
25static int autofs4_dir_mkdir(struct inode *,struct dentry *,int); 25static int autofs4_dir_mkdir(struct inode *,struct dentry *,int);
26static int autofs4_root_ioctl(struct inode *, struct file *,unsigned int,unsigned long); 26static int autofs4_root_ioctl(struct inode *, struct file *,unsigned int,unsigned long);
27static int autofs4_dir_open(struct inode *inode, struct file *file); 27static int autofs4_dir_open(struct inode *inode, struct file *file);
28static int autofs4_root_readdir(struct file * filp, void * dirent, filldir_t filldir);
29static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *); 28static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *);
30static void *autofs4_follow_link(struct dentry *, struct nameidata *); 29static void *autofs4_follow_link(struct dentry *, struct nameidata *);
31 30
@@ -36,7 +35,7 @@ const struct file_operations autofs4_root_operations = {
36 .open = dcache_dir_open, 35 .open = dcache_dir_open,
37 .release = dcache_dir_close, 36 .release = dcache_dir_close,
38 .read = generic_read_dir, 37 .read = generic_read_dir,
39 .readdir = autofs4_root_readdir, 38 .readdir = dcache_readdir,
40 .ioctl = autofs4_root_ioctl, 39 .ioctl = autofs4_root_ioctl,
41}; 40};
42 41
@@ -71,28 +70,6 @@ const struct inode_operations autofs4_dir_inode_operations = {
71 .rmdir = autofs4_dir_rmdir, 70 .rmdir = autofs4_dir_rmdir,
72}; 71};
73 72
74static int autofs4_root_readdir(struct file *file, void *dirent,
75 filldir_t filldir)
76{
77 struct autofs_sb_info *sbi = autofs4_sbi(file->f_path.dentry->d_sb);
78 int oz_mode = autofs4_oz_mode(sbi);
79
80 DPRINTK("called, filp->f_pos = %lld", file->f_pos);
81
82 /*
83 * Don't set reghost flag if:
84 * 1) f_pos is larger than zero -- we've already been here.
85 * 2) we haven't even enabled reghosting in the 1st place.
86 * 3) this is the daemon doing a readdir
87 */
88 if (oz_mode && file->f_pos == 0 && sbi->reghost_enabled)
89 sbi->needs_reghost = 1;
90
91 DPRINTK("needs_reghost = %d", sbi->needs_reghost);
92
93 return dcache_readdir(file, dirent, filldir);
94}
95
96static int autofs4_dir_open(struct inode *inode, struct file *file) 73static int autofs4_dir_open(struct inode *inode, struct file *file)
97{ 74{
98 struct dentry *dentry = file->f_path.dentry; 75 struct dentry *dentry = file->f_path.dentry;
@@ -859,44 +836,6 @@ static inline int autofs4_get_protosubver(struct autofs_sb_info *sbi, int __user
859} 836}
860 837
861/* 838/*
862 * Tells the daemon whether we need to reghost or not. Also, clears
863 * the reghost_needed flag.
864 */
865static inline int autofs4_ask_reghost(struct autofs_sb_info *sbi, int __user *p)
866{
867 int status;
868
869 DPRINTK("returning %d", sbi->needs_reghost);
870
871 status = put_user(sbi->needs_reghost, p);
872 if (status)
873 return status;
874
875 sbi->needs_reghost = 0;
876 return 0;
877}
878
879/*
880 * Enable / Disable reghosting ioctl() operation
881 */
882static inline int autofs4_toggle_reghost(struct autofs_sb_info *sbi, int __user *p)
883{
884 int status;
885 int val;
886
887 status = get_user(val, p);
888
889 DPRINTK("reghost = %d", val);
890
891 if (status)
892 return status;
893
894 /* turn on/off reghosting, with the val */
895 sbi->reghost_enabled = val;
896 return 0;
897}
898
899/*
900* Tells the daemon whether it can umount the autofs mount. 839* Tells the daemon whether it can umount the autofs mount.
901*/ 840*/
902static inline int autofs4_ask_umount(struct vfsmount *mnt, int __user *p) 841static inline int autofs4_ask_umount(struct vfsmount *mnt, int __user *p)
@@ -960,11 +899,6 @@ static int autofs4_root_ioctl(struct inode *inode, struct file *filp,
960 case AUTOFS_IOC_SETTIMEOUT: 899 case AUTOFS_IOC_SETTIMEOUT:
961 return autofs4_get_set_timeout(sbi, p); 900 return autofs4_get_set_timeout(sbi, p);
962 901
963 case AUTOFS_IOC_TOGGLEREGHOST:
964 return autofs4_toggle_reghost(sbi, p);
965 case AUTOFS_IOC_ASKREGHOST:
966 return autofs4_ask_reghost(sbi, p);
967
968 case AUTOFS_IOC_ASKUMOUNT: 902 case AUTOFS_IOC_ASKUMOUNT:
969 return autofs4_ask_umount(filp->f_path.mnt, p); 903 return autofs4_ask_umount(filp->f_path.mnt, p);
970 904
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index 7b3a03c7c6a9..18e2c548161d 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -2297,8 +2297,6 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
2297COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE) 2297COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
2298COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI) 2298COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
2299COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER) 2299COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER)
2300COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST)
2301COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST)
2302COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) 2300COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT)
2303/* Raw devices */ 2301/* Raw devices */
2304COMPATIBLE_IOCTL(RAW_SETBIND) 2302COMPATIBLE_IOCTL(RAW_SETBIND)