aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-14 17:48:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-14 17:48:31 -0400
commitd1794f2c5b5817eb79ccc5e00701ca748d1b073a (patch)
tree5a4c98e694e88a8c82f342d0cc9edb2a4cbbef36 /block
parenta41eebab7537890409ea9dfe0fcda9b5fbdb090d (diff)
parent2fceef397f9880b212a74c418290ce69e7ac00eb (diff)
Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits) IB/umad: BKL is not needed for ib_umad_open() IB/uverbs: BKL is not needed for ib_uverbs_open() bf561-coreb: BKL unneeded for open() Call fasync() functions without the BKL snd/PCM: fasync BKL pushdown ipmi: fasync BKL pushdown ecryptfs: fasync BKL pushdown Bluetooth VHCI: fasync BKL pushdown tty_io: fasync BKL pushdown tun: fasync BKL pushdown i2o: fasync BKL pushdown mpt: fasync BKL pushdown Remove BKL from remote_llseek v2 Make FAT users happier by not deadlocking x86-mce: BKL pushdown vmwatchdog: BKL pushdown vmcp: BKL pushdown via-pmu: BKL pushdown uml-random: BKL pushdown uml-mmapper: BKL pushdown ...
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 93e757d7174b..0b3b282f0384 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -19,6 +19,7 @@
19#include <linux/uio.h> 19#include <linux/uio.h>
20#include <linux/idr.h> 20#include <linux/idr.h>
21#include <linux/bsg.h> 21#include <linux/bsg.h>
22#include <linux/smp_lock.h>
22 23
23#include <scsi/scsi.h> 24#include <scsi/scsi.h>
24#include <scsi/scsi_ioctl.h> 25#include <scsi/scsi_ioctl.h>
@@ -851,7 +852,11 @@ static struct bsg_device *bsg_get_device(struct inode *inode, struct file *file)
851 852
852static int bsg_open(struct inode *inode, struct file *file) 853static int bsg_open(struct inode *inode, struct file *file)
853{ 854{
854 struct bsg_device *bd = bsg_get_device(inode, file); 855 struct bsg_device *bd;
856
857 lock_kernel();
858 bd = bsg_get_device(inode, file);
859 unlock_kernel();
855 860
856 if (IS_ERR(bd)) 861 if (IS_ERR(bd))
857 return PTR_ERR(bd); 862 return PTR_ERR(bd);