aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.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/aacraid/linit.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/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index e9373a2d14fa..33898b61fdb5 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -705,12 +705,17 @@ static int aac_cfg_open(struct inode *inode, struct file *file)
705 * Bugs: Needs to handle hot plugging 705 * Bugs: Needs to handle hot plugging
706 */ 706 */
707 707
708static int aac_cfg_ioctl(struct inode *inode, struct file *file, 708static long aac_cfg_ioctl(struct file *file,
709 unsigned int cmd, unsigned long arg) 709 unsigned int cmd, unsigned long arg)
710{ 710{
711 int ret;
711 if (!capable(CAP_SYS_RAWIO)) 712 if (!capable(CAP_SYS_RAWIO))
712 return -EPERM; 713 return -EPERM;
713 return aac_do_ioctl(file->private_data, cmd, (void __user *)arg); 714 lock_kernel();
715 ret = aac_do_ioctl(file->private_data, cmd, (void __user *)arg);
716 unlock_kernel();
717
718 return ret;
714} 719}
715 720
716#ifdef CONFIG_COMPAT 721#ifdef CONFIG_COMPAT
@@ -1029,7 +1034,7 @@ ssize_t aac_get_serial_number(struct device *device, char *buf)
1029 1034
1030static const struct file_operations aac_cfg_fops = { 1035static const struct file_operations aac_cfg_fops = {
1031 .owner = THIS_MODULE, 1036 .owner = THIS_MODULE,
1032 .ioctl = aac_cfg_ioctl, 1037 .unlocked_ioctl = aac_cfg_ioctl,
1033#ifdef CONFIG_COMPAT 1038#ifdef CONFIG_COMPAT
1034 .compat_ioctl = aac_compat_cfg_ioctl, 1039 .compat_ioctl = aac_compat_cfg_ioctl,
1035#endif 1040#endif