diff options
Diffstat (limited to 'fs/ext2/ioctl.c')
-rw-r--r-- | fs/ext2/ioctl.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c index 320b2cb3d4d2..b8ea11fee5c6 100644 --- a/fs/ext2/ioctl.c +++ b/fs/ext2/ioctl.c | |||
@@ -17,9 +17,9 @@ | |||
17 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
18 | 18 | ||
19 | 19 | ||
20 | int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, | 20 | long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
21 | unsigned long arg) | ||
22 | { | 21 | { |
22 | struct inode *inode = filp->f_dentry->d_inode; | ||
23 | struct ext2_inode_info *ei = EXT2_I(inode); | 23 | struct ext2_inode_info *ei = EXT2_I(inode); |
24 | unsigned int flags; | 24 | unsigned int flags; |
25 | unsigned short rsv_window_size; | 25 | unsigned short rsv_window_size; |
@@ -141,9 +141,6 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, | |||
141 | #ifdef CONFIG_COMPAT | 141 | #ifdef CONFIG_COMPAT |
142 | long ext2_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 142 | long ext2_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
143 | { | 143 | { |
144 | struct inode *inode = file->f_path.dentry->d_inode; | ||
145 | int ret; | ||
146 | |||
147 | /* These are just misnamed, they actually get/put from/to user an int */ | 144 | /* These are just misnamed, they actually get/put from/to user an int */ |
148 | switch (cmd) { | 145 | switch (cmd) { |
149 | case EXT2_IOC32_GETFLAGS: | 146 | case EXT2_IOC32_GETFLAGS: |
@@ -161,9 +158,6 @@ long ext2_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
161 | default: | 158 | default: |
162 | return -ENOIOCTLCMD; | 159 | return -ENOIOCTLCMD; |
163 | } | 160 | } |
164 | lock_kernel(); | 161 | return ext2_ioctl(file, cmd, (unsigned long) compat_ptr(arg)); |
165 | ret = ext2_ioctl(inode, file, cmd, (unsigned long) compat_ptr(arg)); | ||
166 | unlock_kernel(); | ||
167 | return ret; | ||
168 | } | 162 | } |
169 | #endif | 163 | #endif |