]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - block/bsg.c
Merge commit 'v2.6.26' into bkl-removal
[linux-2.6-omap-h63xx.git] / block / bsg.c
index 54d617f7df3e03b3aa02def2473b03ad66a5d39b..7c59ffaedfe0860ffc55c8f9519a991e79688514 100644 (file)
@@ -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>
@@ -835,7 +836,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);