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
@@ -180,8 +180,8 @@ static const char *gdth_ctr_name(gdth_ha_str *ha);
|
||||
|
||||
static int gdth_open(struct inode *inode, struct file *filep);
|
||||
static int gdth_close(struct inode *inode, struct file *filep);
|
||||
static int gdth_ioctl(struct inode *inode, struct file *filep,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
static long gdth_unlocked_ioctl(struct file *filep, unsigned int cmd,
|
||||
unsigned long arg);
|
||||
|
||||
static void gdth_flush(gdth_ha_str *ha);
|
||||
static int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *));
|
||||
@@ -369,7 +369,7 @@ MODULE_LICENSE("GPL");
|
||||
|
||||
/* ioctl interface */
|
||||
static const struct file_operations gdth_fops = {
|
||||
.ioctl = gdth_ioctl,
|
||||
.unlocked_ioctl = gdth_unlocked_ioctl,
|
||||
.open = gdth_open,
|
||||
.release = gdth_close,
|
||||
};
|
||||
@@ -4462,8 +4462,7 @@ free_fail:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int gdth_ioctl(struct inode *inode, struct file *filep,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
static int gdth_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
gdth_ha_str *ha;
|
||||
Scsi_Cmnd *scp;
|
||||
@@ -4611,6 +4610,17 @@ static int gdth_ioctl(struct inode *inode, struct file *filep,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long gdth_unlocked_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = gdth_ioctl(file, cmd, arg);
|
||||
unlock_kernel();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* flush routine */
|
||||
static void gdth_flush(gdth_ha_str *ha)
|
||||
|
Reference in New Issue
Block a user