summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/osst.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-15 12:23:19 -0600
committerJonathan Corbet <corbet@lwn.net>2008-06-20 14:05:49 -0600
commit647d87bd1b9e7ff24f89b7d4e38c75d756018caa (patch)
tree8dafda1aeb310843b5f7c087ae7b3c706138796a /drivers/scsi/osst.c
parenteb09d3d4ee09b25876db549b6d5221610216e105 (diff)
downloadop-kernel-dev-647d87bd1b9e7ff24f89b7d4e38c75d756018caa.zip
op-kernel-dev-647d87bd1b9e7ff24f89b7d4e38c75d756018caa.tar.gz
osst: cdev lock_kernel() pushdown.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/scsi/osst.c')
-rw-r--r--drivers/scsi/osst.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index 31f7aec..24ad89a 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -50,6 +50,7 @@ static const char * osst_version = "0.99.4";
#include <linux/moduleparam.h>
#include <linux/delay.h>
#include <linux/jiffies.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/dma.h>
#include <asm/system.h>
@@ -4359,7 +4360,7 @@ os_bypass:
/* Open the device */
-static int os_scsi_tape_open(struct inode * inode, struct file * filp)
+static int __os_scsi_tape_open(struct inode * inode, struct file * filp)
{
unsigned short flags;
int i, b_size, new_session = 0, retval = 0;
@@ -4725,6 +4726,18 @@ err_out:
return retval;
}
+/* BKL pushdown: spaghetti avoidance wrapper */
+static int os_scsi_tape_open(struct inode * inode, struct file * filp)
+{
+ int ret;
+
+ lock_kernel();
+ ret = __os_scsi_tape_open(inode, filp);
+ unlock_kernel();
+ return ret;
+}
+
+
/* Flush the tape buffer before close */
static int os_scsi_tape_flush(struct file * filp, fl_owner_t id)
OpenPOWER on IntegriCloud