From: Jonathan Corbet Date: Thu, 15 May 2008 18:23:19 +0000 (-0600) Subject: osst: cdev lock_kernel() pushdown. X-Git-Tag: v2.6.27-rc1~1103^2~119 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=647d87bd1b9e7ff24f89b7d4e38c75d756018caa;p=linux-2.6-omap-h63xx.git osst: cdev lock_kernel() pushdown. Signed-off-by: Jonathan Corbet --- diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 31f7aec44d9..24ad89a649c 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -50,6 +50,7 @@ static const char * osst_version = "0.99.4"; #include #include #include +#include #include #include #include @@ -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)