diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-04-26 18:24:01 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-16 23:27:04 -0400 |
commit | f4927c45beda9a70e5c3bda0bd9f12b4f713c00b (patch) | |
tree | 18256d3dd635e931838e3d83b071ca5a1e61a163 /drivers/scsi/megaraid | |
parent | 16ef8def80ea97c3cacdcaa765bdf62b2d94f86d (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/megaraid')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mm.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c index 36e0b7d05c1d..41f82f76d884 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | // Entry points for char node driver | 23 | // Entry points for char node driver |
24 | static int mraid_mm_open(struct inode *, struct file *); | 24 | static int mraid_mm_open(struct inode *, struct file *); |
25 | static int mraid_mm_ioctl(struct inode *, struct file *, uint, unsigned long); | 25 | static long mraid_mm_unlocked_ioctl(struct file *, uint, unsigned long); |
26 | 26 | ||
27 | 27 | ||
28 | // routines to convert to and from the old the format | 28 | // routines to convert to and from the old the format |
@@ -70,7 +70,7 @@ static wait_queue_head_t wait_q; | |||
70 | 70 | ||
71 | static const struct file_operations lsi_fops = { | 71 | static const struct file_operations lsi_fops = { |
72 | .open = mraid_mm_open, | 72 | .open = mraid_mm_open, |
73 | .ioctl = mraid_mm_ioctl, | 73 | .unlocked_ioctl = mraid_mm_unlocked_ioctl, |
74 | #ifdef CONFIG_COMPAT | 74 | #ifdef CONFIG_COMPAT |
75 | .compat_ioctl = mraid_mm_compat_ioctl, | 75 | .compat_ioctl = mraid_mm_compat_ioctl, |
76 | #endif | 76 | #endif |
@@ -110,8 +110,7 @@ mraid_mm_open(struct inode *inode, struct file *filep) | |||
110 | * @arg : user ioctl packet | 110 | * @arg : user ioctl packet |
111 | */ | 111 | */ |
112 | static int | 112 | static int |
113 | mraid_mm_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | 113 | mraid_mm_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) |
114 | unsigned long arg) | ||
115 | { | 114 | { |
116 | uioc_t *kioc; | 115 | uioc_t *kioc; |
117 | char signature[EXT_IOCTL_SIGN_SZ] = {0}; | 116 | char signature[EXT_IOCTL_SIGN_SZ] = {0}; |
@@ -218,6 +217,19 @@ mraid_mm_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
218 | return rval; | 217 | return rval; |
219 | } | 218 | } |
220 | 219 | ||
220 | static long | ||
221 | mraid_mm_unlocked_ioctl(struct file *filep, unsigned int cmd, | ||
222 | unsigned long arg) | ||
223 | { | ||
224 | int err; | ||
225 | |||
226 | /* inconsistant: mraid_mm_compat_ioctl doesn't take the BKL */ | ||
227 | lock_kernel(); | ||
228 | err = mraid_mm_ioctl(filep, cmd, arg); | ||
229 | unlock_kernel(); | ||
230 | |||
231 | return err; | ||
232 | } | ||
221 | 233 | ||
222 | /** | 234 | /** |
223 | * mraid_mm_get_adapter - Returns corresponding adapters for the mimd packet | 235 | * mraid_mm_get_adapter - Returns corresponding adapters for the mimd packet |
@@ -1225,7 +1237,7 @@ mraid_mm_compat_ioctl(struct file *filep, unsigned int cmd, | |||
1225 | { | 1237 | { |
1226 | int err; | 1238 | int err; |
1227 | 1239 | ||
1228 | err = mraid_mm_ioctl(NULL, filep, cmd, arg); | 1240 | err = mraid_mm_ioctl(filep, cmd, arg); |
1229 | 1241 | ||
1230 | return err; | 1242 | return err; |
1231 | } | 1243 | } |