Commit be71e25f authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] sparse: autofs annotation

parent 09fe6242
...@@ -468,7 +468,7 @@ static int autofs_root_mkdir(struct inode *dir, struct dentry *dentry, int mode) ...@@ -468,7 +468,7 @@ static int autofs_root_mkdir(struct inode *dir, struct dentry *dentry, int mode)
/* Get/set timeout ioctl() operation */ /* Get/set timeout ioctl() operation */
static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi, static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi,
unsigned long *p) unsigned long __user *p)
{ {
unsigned long ntimeout; unsigned long ntimeout;
...@@ -485,7 +485,7 @@ static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi, ...@@ -485,7 +485,7 @@ static inline int autofs_get_set_timeout(struct autofs_sb_info *sbi,
} }
/* Return protocol version */ /* Return protocol version */
static inline int autofs_get_protover(int *p) static inline int autofs_get_protover(int __user *p)
{ {
return put_user(AUTOFS_PROTO_VERSION, p); return put_user(AUTOFS_PROTO_VERSION, p);
} }
...@@ -494,7 +494,7 @@ static inline int autofs_get_protover(int *p) ...@@ -494,7 +494,7 @@ static inline int autofs_get_protover(int *p)
static inline int autofs_expire_run(struct super_block *sb, static inline int autofs_expire_run(struct super_block *sb,
struct autofs_sb_info *sbi, struct autofs_sb_info *sbi,
struct vfsmount *mnt, struct vfsmount *mnt,
struct autofs_packet_expire *pkt_p) struct autofs_packet_expire __user *pkt_p)
{ {
struct autofs_dir_ent *ent; struct autofs_dir_ent *ent;
struct autofs_packet_expire pkt; struct autofs_packet_expire pkt;
...@@ -526,6 +526,7 @@ static int autofs_root_ioctl(struct inode *inode, struct file *filp, ...@@ -526,6 +526,7 @@ static int autofs_root_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct autofs_sb_info *sbi = autofs_sbi(inode->i_sb); struct autofs_sb_info *sbi = autofs_sbi(inode->i_sb);
void __user *argp = (void __user *)arg;
DPRINTK(("autofs_ioctl: cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u\n",cmd,arg,sbi,process_group(current))); DPRINTK(("autofs_ioctl: cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u\n",cmd,arg,sbi,process_group(current)));
...@@ -545,12 +546,12 @@ static int autofs_root_ioctl(struct inode *inode, struct file *filp, ...@@ -545,12 +546,12 @@ static int autofs_root_ioctl(struct inode *inode, struct file *filp,
autofs_catatonic_mode(sbi); autofs_catatonic_mode(sbi);
return 0; return 0;
case AUTOFS_IOC_PROTOVER: /* Get protocol version */ case AUTOFS_IOC_PROTOVER: /* Get protocol version */
return autofs_get_protover((int *)arg); return autofs_get_protover(argp);
case AUTOFS_IOC_SETTIMEOUT: case AUTOFS_IOC_SETTIMEOUT:
return autofs_get_set_timeout(sbi,(unsigned long *)arg); return autofs_get_set_timeout(sbi, argp);
case AUTOFS_IOC_EXPIRE: case AUTOFS_IOC_EXPIRE:
return autofs_expire_run(inode->i_sb, sbi, filp->f_vfsmnt, return autofs_expire_run(inode->i_sb, sbi, filp->f_vfsmnt,
(struct autofs_packet_expire *)arg); argp);
default: default:
return -ENOSYS; return -ENOSYS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment