aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/megaraid.c')
-rw-r--r--drivers/scsi/megaraid.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 0b6e3228610a..4d0cf5cd82cc 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -46,7 +46,7 @@
46#include <linux/pci.h> 46#include <linux/pci.h>
47#include <linux/init.h> 47#include <linux/init.h>
48#include <linux/dma-mapping.h> 48#include <linux/dma-mapping.h>
49#include <linux/smp_lock.h> 49#include <linux/mutex.h>
50#include <linux/slab.h> 50#include <linux/slab.h>
51#include <scsi/scsicam.h> 51#include <scsi/scsicam.h>
52 52
@@ -62,6 +62,7 @@ MODULE_DESCRIPTION ("LSI Logic MegaRAID legacy driver");
62MODULE_LICENSE ("GPL"); 62MODULE_LICENSE ("GPL");
63MODULE_VERSION(MEGARAID_MODULE_VERSION); 63MODULE_VERSION(MEGARAID_MODULE_VERSION);
64 64
65static DEFINE_MUTEX(megadev_mutex);
65static unsigned int max_cmd_per_lun = DEF_CMD_PER_LUN; 66static unsigned int max_cmd_per_lun = DEF_CMD_PER_LUN;
66module_param(max_cmd_per_lun, uint, 0); 67module_param(max_cmd_per_lun, uint, 0);
67MODULE_PARM_DESC(max_cmd_per_lun, "Maximum number of commands which can be issued to a single LUN (default=DEF_CMD_PER_LUN=63)"); 68MODULE_PARM_DESC(max_cmd_per_lun, "Maximum number of commands which can be issued to a single LUN (default=DEF_CMD_PER_LUN=63)");
@@ -3282,7 +3283,6 @@ mega_init_scb(adapter_t *adapter)
3282static int 3283static int
3283megadev_open (struct inode *inode, struct file *filep) 3284megadev_open (struct inode *inode, struct file *filep)
3284{ 3285{
3285 cycle_kernel_lock();
3286 /* 3286 /*
3287 * Only allow superuser to access private ioctl interface 3287 * Only allow superuser to access private ioctl interface
3288 */ 3288 */
@@ -3701,9 +3701,9 @@ megadev_unlocked_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
3701{ 3701{
3702 int ret; 3702 int ret;
3703 3703
3704 lock_kernel(); 3704 mutex_lock(&megadev_mutex);
3705 ret = megadev_ioctl(filep, cmd, arg); 3705 ret = megadev_ioctl(filep, cmd, arg);
3706 unlock_kernel(); 3706 mutex_unlock(&megadev_mutex);
3707 3707
3708 return ret; 3708 return ret;
3709} 3709}