aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ioctl.c')
-rw-r--r--fs/ioctl.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c
index 8c90cbc903fa..c2a773e8620b 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -12,7 +12,6 @@
12#include <linux/fs.h> 12#include <linux/fs.h>
13#include <linux/security.h> 13#include <linux/security.h>
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/kallsyms.h>
16 15
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
18#include <asm/ioctls.h> 17#include <asm/ioctls.h>
@@ -21,7 +20,6 @@ static long do_ioctl(struct file *filp, unsigned int cmd,
21 unsigned long arg) 20 unsigned long arg)
22{ 21{
23 int error = -ENOTTY; 22 int error = -ENOTTY;
24 void *f;
25 23
26 if (!filp->f_op) 24 if (!filp->f_op)
27 goto out; 25 goto out;
@@ -31,16 +29,10 @@ static long do_ioctl(struct file *filp, unsigned int cmd,
31 if (error == -ENOIOCTLCMD) 29 if (error == -ENOIOCTLCMD)
32 error = -EINVAL; 30 error = -EINVAL;
33 goto out; 31 goto out;
34 } else if ((f = filp->f_op->ioctl)) { 32 } else if (filp->f_op->ioctl) {
35 lock_kernel(); 33 lock_kernel();
36 if (!filp->f_op->ioctl) { 34 error = filp->f_op->ioctl(filp->f_path.dentry->d_inode,
37 printk("%s: ioctl %p disappeared\n", __FUNCTION__, f); 35 filp, cmd, arg);
38 print_symbol("symbol: %s\n", (unsigned long)f);
39 dump_stack();
40 } else {
41 error = filp->f_op->ioctl(filp->f_path.dentry->d_inode,
42 filp, cmd, arg);
43 }
44 unlock_kernel(); 36 unlock_kernel();
45 } 37 }
46 38
@@ -182,11 +174,3 @@ asmlinkage long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
182 out: 174 out:
183 return error; 175 return error;
184} 176}
185
186/*
187 * Platforms implementing 32 bit compatibility ioctl handlers in
188 * modules need this exported
189 */
190#ifdef CONFIG_COMPAT
191EXPORT_SYMBOL(sys_ioctl);
192#endif