From 35385d7a83b4cae6d5ea5f80f3b3377d94178344 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 9 Jul 2000 23:29:35 +0000 Subject: Merge with 2.4.0-test3-pre7. --- fs/block_dev.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/block_dev.c') diff --git a/fs/block_dev.c b/fs/block_dev.c index 02ae171c4..9a034ca60 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -11,6 +11,7 @@ #include #include #include +#include #include @@ -611,6 +612,7 @@ int blkdev_open(struct inode * inode, struct file * filp) int ret = -ENODEV; struct block_device *bdev = inode->i_bdev; down(&bdev->bd_sem); + lock_kernel(); if (!bdev->bd_op) bdev->bd_op = get_blkfops(MAJOR(inode->i_rdev)); if (bdev->bd_op) { @@ -622,6 +624,7 @@ int blkdev_open(struct inode * inode, struct file * filp) else if (!atomic_read(&bdev->bd_openers)) bdev->bd_op = NULL; } + unlock_kernel(); up(&bdev->bd_sem); return ret; } -- cgit v1.2.3