diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl32.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index b6321abd9a81..251bfe451a3f 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
@@ -72,7 +72,7 @@ xfs_ioctl32_flock( | |||
72 | copy_in_user(&p->l_pid, &p32->l_pid, sizeof(u32)) || | 72 | copy_in_user(&p->l_pid, &p32->l_pid, sizeof(u32)) || |
73 | copy_in_user(&p->l_pad, &p32->l_pad, 4*sizeof(u32))) | 73 | copy_in_user(&p->l_pad, &p32->l_pad, 4*sizeof(u32))) |
74 | return -EFAULT; | 74 | return -EFAULT; |
75 | 75 | ||
76 | return (unsigned long)p; | 76 | return (unsigned long)p; |
77 | } | 77 | } |
78 | 78 | ||
@@ -107,11 +107,15 @@ xfs_ioctl32_bulkstat( | |||
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | STATIC long | 109 | STATIC long |
110 | xfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg) | 110 | xfs_compat_ioctl( |
111 | int mode, | ||
112 | struct file *file, | ||
113 | unsigned cmd, | ||
114 | unsigned long arg) | ||
111 | { | 115 | { |
116 | struct inode *inode = file->f_dentry->d_inode; | ||
117 | vnode_t *vp = vn_from_inode(inode); | ||
112 | int error; | 118 | int error; |
113 | struct inode *inode = f->f_dentry->d_inode; | ||
114 | vnode_t *vp = vn_to_inode(inode); | ||
115 | 119 | ||
116 | switch (cmd) { | 120 | switch (cmd) { |
117 | case XFS_IOC_DIOINFO: | 121 | case XFS_IOC_DIOINFO: |
@@ -189,7 +193,7 @@ xfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg) | |||
189 | return -ENOIOCTLCMD; | 193 | return -ENOIOCTLCMD; |
190 | } | 194 | } |
191 | 195 | ||
192 | VOP_IOCTL(vp, inode, f, mode, cmd, (void __user *)arg, error); | 196 | VOP_IOCTL(vp, inode, file, mode, cmd, (void __user *)arg, error); |
193 | VMODIFY(vp); | 197 | VMODIFY(vp); |
194 | 198 | ||
195 | return error; | 199 | return error; |
@@ -197,18 +201,18 @@ xfs_compat_ioctl(int mode, struct file *f, unsigned cmd, unsigned long arg) | |||
197 | 201 | ||
198 | long | 202 | long |
199 | xfs_file_compat_ioctl( | 203 | xfs_file_compat_ioctl( |
200 | struct file *f, | 204 | struct file *file, |
201 | unsigned cmd, | 205 | unsigned cmd, |
202 | unsigned long arg) | 206 | unsigned long arg) |
203 | { | 207 | { |
204 | return xfs_compat_ioctl(0, f, cmd, arg); | 208 | return xfs_compat_ioctl(0, file, cmd, arg); |
205 | } | 209 | } |
206 | 210 | ||
207 | long | 211 | long |
208 | xfs_file_compat_invis_ioctl( | 212 | xfs_file_compat_invis_ioctl( |
209 | struct file *f, | 213 | struct file *file, |
210 | unsigned cmd, | 214 | unsigned cmd, |
211 | unsigned long arg) | 215 | unsigned long arg) |
212 | { | 216 | { |
213 | return xfs_compat_ioctl(IO_INVIS, f, cmd, arg); | 217 | return xfs_compat_ioctl(IO_INVIS, file, cmd, arg); |
214 | } | 218 | } |