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>
This commit is contained in:

committed by
Frederic Weisbecker

parent
16ef8def80
commit
f4927c45be
@@ -91,12 +91,15 @@ static struct proc_dir_entry *mega_proc_dir_entry;
|
||||
/* For controller re-ordering */
|
||||
static struct mega_hbas mega_hbas[MAX_CONTROLLERS];
|
||||
|
||||
static long
|
||||
megadev_unlocked_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
|
||||
|
||||
/*
|
||||
* The File Operations structure for the serial/ioctl interface of the driver
|
||||
*/
|
||||
static const struct file_operations megadev_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.ioctl = megadev_ioctl,
|
||||
.unlocked_ioctl = megadev_unlocked_ioctl,
|
||||
.open = megadev_open,
|
||||
};
|
||||
|
||||
@@ -3302,8 +3305,7 @@ megadev_open (struct inode *inode, struct file *filep)
|
||||
* controller.
|
||||
*/
|
||||
static int
|
||||
megadev_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
megadev_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
adapter_t *adapter;
|
||||
nitioctl_t uioc;
|
||||
@@ -3694,6 +3696,18 @@ freemem_and_return:
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long
|
||||
megadev_unlocked_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = megadev_ioctl(filep, cmd, arg);
|
||||
unlock_kernel();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* mega_m_to_n()
|
||||
* @arg - user address
|
||||
|
Reference in New Issue
Block a user