summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-15 17:09:23 +0200
committerJonathan Corbet <corbet@lwn.net>2008-05-18 23:43:40 +0200
commit75bd2ef1457998791cfc89cd59927574488fc22a (patch)
tree8468afbf17f58ab7bfbb661fa167e50a9e06994c /block
parentLinux 2.6.26-rc3 (diff)
downloadlinux-75bd2ef1457998791cfc89cd59927574488fc22a.tar.xz
linux-75bd2ef1457998791cfc89cd59927574488fc22a.zip
bsg: cdev lock_kernel() pushdown
Push the cdev lock_kernel call into bsg_open(). Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'block')
-rw-r--r--block/bsg.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/block/bsg.c b/block/bsg.c
index f0b7cd343216..dbe3ffd505ca 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -19,6 +19,7 @@
#include <linux/uio.h>
#include <linux/idr.h>
#include <linux/bsg.h>
+#include <linux/smp_lock.h>
#include <scsi/scsi.h>
#include <scsi/scsi_ioctl.h>
@@ -834,7 +835,11 @@ static struct bsg_device *bsg_get_device(struct inode *inode, struct file *file)
static int bsg_open(struct inode *inode, struct file *file)
{
- struct bsg_device *bd = bsg_get_device(inode, file);
+ struct bsg_device *bd;
+
+ lock_kernel();
+ bd = bsg_get_device(inode, file);
+ unlock_kernel();
if (IS_ERR(bd))
return PTR_ERR(bd);