aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth.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/gdth.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/gdth.c')
-rw-r--r--drivers/scsi/gdth.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 35a4b3073ec3..d3f335db3d8d 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -180,8 +180,8 @@ static const char *gdth_ctr_name(gdth_ha_str *ha);
180 180
181static int gdth_open(struct inode *inode, struct file *filep); 181static int gdth_open(struct inode *inode, struct file *filep);
182static int gdth_close(struct inode *inode, struct file *filep); 182static int gdth_close(struct inode *inode, struct file *filep);
183static int gdth_ioctl(struct inode *inode, struct file *filep, 183static long gdth_unlocked_ioctl(struct file *filep, unsigned int cmd,
184 unsigned int cmd, unsigned long arg); 184 unsigned long arg);
185 185
186static void gdth_flush(gdth_ha_str *ha); 186static void gdth_flush(gdth_ha_str *ha);
187static int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *)); 187static int gdth_queuecommand(Scsi_Cmnd *scp,void (*done)(Scsi_Cmnd *));
@@ -369,7 +369,7 @@ MODULE_LICENSE("GPL");
369 369
370/* ioctl interface */ 370/* ioctl interface */
371static const struct file_operations gdth_fops = { 371static const struct file_operations gdth_fops = {
372 .ioctl = gdth_ioctl, 372 .unlocked_ioctl = gdth_unlocked_ioctl,
373 .open = gdth_open, 373 .open = gdth_open,
374 .release = gdth_close, 374 .release = gdth_close,
375}; 375};
@@ -4462,8 +4462,7 @@ free_fail:
4462 return rc; 4462 return rc;
4463} 4463}
4464 4464
4465static int gdth_ioctl(struct inode *inode, struct file *filep, 4465static int gdth_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
4466 unsigned int cmd, unsigned long arg)
4467{ 4466{
4468 gdth_ha_str *ha; 4467 gdth_ha_str *ha;
4469 Scsi_Cmnd *scp; 4468 Scsi_Cmnd *scp;
@@ -4611,6 +4610,17 @@ static int gdth_ioctl(struct inode *inode, struct file *filep,
4611 return 0; 4610 return 0;
4612} 4611}
4613 4612
4613static long gdth_unlocked_ioctl(struct file *file, unsigned int cmd,
4614 unsigned long arg)
4615{
4616 int ret;
4617
4618 lock_kernel();
4619 ret = gdth_ioctl(file, cmd, arg);
4620 unlock_kernel();
4621
4622 return ret;
4623}
4614 4624
4615/* flush routine */ 4625/* flush routine */
4616static void gdth_flush(gdth_ha_str *ha) 4626static void gdth_flush(gdth_ha_str *ha)