]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
autofs4: remove unused ioctls
authorIan Kent <raven@themaw.net>
Thu, 24 Jul 2008 04:30:29 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:33 +0000 (10:47 -0700)
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>
fs/autofs4/root.c
fs/compat_ioctl.c
include/linux/auto_fs4.h

index ae22bde0bbd7e1d5339f6091e63f0ad004892b34..bcfb2dc0a61bf56d0e1c4be07612f24454834c08 100644 (file)
@@ -25,7 +25,6 @@ static int autofs4_dir_rmdir(struct inode *,struct dentry *);
 static int autofs4_dir_mkdir(struct inode *,struct dentry *,int);
 static int autofs4_root_ioctl(struct inode *, struct file *,unsigned int,unsigned long);
 static int autofs4_dir_open(struct inode *inode, struct file *file);
-static int autofs4_root_readdir(struct file * filp, void * dirent, filldir_t filldir);
 static struct dentry *autofs4_lookup(struct inode *,struct dentry *, struct nameidata *);
 static void *autofs4_follow_link(struct dentry *, struct nameidata *);
 
@@ -36,7 +35,7 @@ const struct file_operations autofs4_root_operations = {
        .open           = dcache_dir_open,
        .release        = dcache_dir_close,
        .read           = generic_read_dir,
-       .readdir        = autofs4_root_readdir,
+       .readdir        = dcache_readdir,
        .ioctl          = autofs4_root_ioctl,
 };
 
@@ -71,28 +70,6 @@ const struct inode_operations autofs4_dir_inode_operations = {
        .rmdir          = autofs4_dir_rmdir,
 };
 
-static int autofs4_root_readdir(struct file *file, void *dirent,
-                               filldir_t filldir)
-{
-       struct autofs_sb_info *sbi = autofs4_sbi(file->f_path.dentry->d_sb);
-       int oz_mode = autofs4_oz_mode(sbi);
-
-       DPRINTK("called, filp->f_pos = %lld", file->f_pos);
-
-       /*
-        * Don't set reghost flag if:
-        * 1) f_pos is larger than zero -- we've already been here.
-        * 2) we haven't even enabled reghosting in the 1st place.
-        * 3) this is the daemon doing a readdir
-        */
-       if (oz_mode && file->f_pos == 0 && sbi->reghost_enabled)
-               sbi->needs_reghost = 1;
-
-       DPRINTK("needs_reghost = %d", sbi->needs_reghost);
-
-       return dcache_readdir(file, dirent, filldir);
-}
-
 static int autofs4_dir_open(struct inode *inode, struct file *file)
 {
        struct dentry *dentry = file->f_path.dentry;
@@ -858,44 +835,6 @@ static inline int autofs4_get_protosubver(struct autofs_sb_info *sbi, int __user
        return put_user(sbi->sub_version, p);
 }
 
-/*
- * Tells the daemon whether we need to reghost or not. Also, clears
- * the reghost_needed flag.
- */
-static inline int autofs4_ask_reghost(struct autofs_sb_info *sbi, int __user *p)
-{
-       int status;
-
-       DPRINTK("returning %d", sbi->needs_reghost);
-
-       status = put_user(sbi->needs_reghost, p);
-       if (status)
-               return status;
-
-       sbi->needs_reghost = 0;
-       return 0;
-}
-
-/*
- * Enable / Disable reghosting ioctl() operation
- */
-static inline int autofs4_toggle_reghost(struct autofs_sb_info *sbi, int __user *p)
-{
-       int status;
-       int val;
-
-       status = get_user(val, p);
-
-       DPRINTK("reghost = %d", val);
-
-       if (status)
-               return status;
-
-       /* turn on/off reghosting, with the val */
-       sbi->reghost_enabled = val;
-       return 0;
-}
-
 /*
 * Tells the daemon whether it can umount the autofs mount.
 */
@@ -960,11 +899,6 @@ static int autofs4_root_ioctl(struct inode *inode, struct file *filp,
        case AUTOFS_IOC_SETTIMEOUT:
                return autofs4_get_set_timeout(sbi, p);
 
-       case AUTOFS_IOC_TOGGLEREGHOST:
-               return autofs4_toggle_reghost(sbi, p);
-       case AUTOFS_IOC_ASKREGHOST:
-               return autofs4_ask_reghost(sbi, p);
-
        case AUTOFS_IOC_ASKUMOUNT:
                return autofs4_ask_umount(filp->f_path.mnt, p);
 
index 7b3a03c7c6a9dc5699663c044108d0323b0cc036..18e2c548161d43661e10f99f7b8f412d0c0e523c 100644 (file)
@@ -2297,8 +2297,6 @@ COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
 COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER)
-COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST)
-COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST)
 COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT)
 /* Raw devices */
 COMPATIBLE_IOCTL(RAW_SETBIND)
index 31a29541b504234174c0a9678bba9b60bc60e7ac..b785c6f8644dc28ca92793f96c31ab0b53ab4c85 100644 (file)
@@ -98,8 +98,6 @@ union autofs_v5_packet_union {
 #define AUTOFS_IOC_EXPIRE_INDIRECT     AUTOFS_IOC_EXPIRE_MULTI
 #define AUTOFS_IOC_EXPIRE_DIRECT       AUTOFS_IOC_EXPIRE_MULTI
 #define AUTOFS_IOC_PROTOSUBVER         _IOR(0x93,0x67,int)
-#define AUTOFS_IOC_ASKREGHOST           _IOR(0x93,0x68,int)
-#define AUTOFS_IOC_TOGGLEREGHOST        _IOR(0x93,0x69,int)
 #define AUTOFS_IOC_ASKUMOUNT           _IOR(0x93,0x70,int)