aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dpt_i2o.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-04-26 18:24:01 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-05-16 23:27:04 -0400
commitf4927c45beda9a70e5c3bda0bd9f12b4f713c00b (patch)
tree18256d3dd635e931838e3d83b071ca5a1e61a163 /drivers/scsi/dpt_i2o.c
parent16ef8def80ea97c3cacdcaa765bdf62b2d94f86d (diff)
scsi: Push down BKL into ioctl functions
Push down the bkl into ioctl functions on the scsi layer. [jkacur: Forward declaration missing ';'. Conflicting declaraction in megaraid.h changed Fixed missing inodes declarations] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r--drivers/scsi/dpt_i2o.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 0435d044c9da..b0c576f84b28 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -114,12 +114,13 @@ static int hba_count = 0;
114 114
115static struct class *adpt_sysfs_class; 115static struct class *adpt_sysfs_class;
116 116
117static long adpt_unlocked_ioctl(struct file *, unsigned int, unsigned long);
117#ifdef CONFIG_COMPAT 118#ifdef CONFIG_COMPAT
118static long compat_adpt_ioctl(struct file *, unsigned int, unsigned long); 119static long compat_adpt_ioctl(struct file *, unsigned int, unsigned long);
119#endif 120#endif
120 121
121static const struct file_operations adpt_fops = { 122static const struct file_operations adpt_fops = {
122 .ioctl = adpt_ioctl, 123 .unlocked_ioctl = adpt_unlocked_ioctl,
123 .open = adpt_open, 124 .open = adpt_open,
124 .release = adpt_close, 125 .release = adpt_close,
125#ifdef CONFIG_COMPAT 126#ifdef CONFIG_COMPAT
@@ -2069,8 +2070,7 @@ static int adpt_system_info(void __user *buffer)
2069 return 0; 2070 return 0;
2070} 2071}
2071 2072
2072static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, 2073static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd, ulong arg)
2073 ulong arg)
2074{ 2074{
2075 int minor; 2075 int minor;
2076 int error = 0; 2076 int error = 0;
@@ -2153,6 +2153,20 @@ static int adpt_ioctl(struct inode *inode, struct file *file, uint cmd,
2153 return error; 2153 return error;
2154} 2154}
2155 2155
2156static long adpt_unlocked_ioctl(struct file *file, uint cmd, ulong arg)
2157{
2158 struct inode *inode;
2159 long ret;
2160
2161 inode = file->f_dentry->d_inode;
2162
2163 lock_kernel();
2164 ret = adpt_ioctl(inode, file, cmd, arg);
2165 unlock_kernel();
2166
2167 return ret;
2168}
2169
2156#ifdef CONFIG_COMPAT 2170#ifdef CONFIG_COMPAT
2157static long compat_adpt_ioctl(struct file *file, 2171static long compat_adpt_ioctl(struct file *file,
2158 unsigned int cmd, unsigned long arg) 2172 unsigned int cmd, unsigned long arg)