aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/gdth.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-24 11:01:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-24 11:01:10 -0400
commitf13771187b9423b824f32518319f6da85d819003 (patch)
treec431cf16c286065a302d5f3fb43fc1abac7e4047 /drivers/scsi/gdth.c
parent15953654cc312429740fd58fb37a5a3d63a54376 (diff)
parent9f37af654fda88a8dcca74c785f6c20e52758866 (diff)
Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: uml: Pushdown the bkl from harddog_kern ioctl sunrpc: Pushdown the bkl from sunrpc cache ioctl sunrpc: Pushdown the bkl from ioctl autofs4: Pushdown the bkl from ioctl uml: Convert to unlocked_ioctls to remove implicit BKL ncpfs: BKL ioctl pushdown coda: Clean-up whitespace problems in pioctl.c coda: BKL ioctl pushdown drivers: Push down BKL into various drivers isdn: Push down BKL into ioctl functions scsi: Push down BKL into ioctl functions dvb: Push down BKL into ioctl functions smbfs: Push down BKL into ioctl function coda/psdev: Remove BKL from ioctl function um/mmapper: Remove BKL usage sn_hwperf: Kill BKL usage hfsplus: Push down BKL into ioctl function
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 a765fe7a55c3..f672d6213eea 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)