mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 11:54:37 +08:00
s390/block: kill the big kernel lock
The dasd and dcssblk drivers gained the big kernel lock in the recent pushdown from the block layer, but they don't really need it, so remove the calls without a replacement. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: linux-s390@vger.kernel.org
This commit is contained in:
parent
54066a57c5
commit
cfdb00a77e
@ -21,7 +21,6 @@
|
|||||||
#include <linux/hdreg.h>
|
#include <linux/hdreg.h>
|
||||||
#include <linux/async.h>
|
#include <linux/async.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
|
|
||||||
#include <asm/ccwdev.h>
|
#include <asm/ccwdev.h>
|
||||||
#include <asm/ebcdic.h>
|
#include <asm/ebcdic.h>
|
||||||
@ -2236,7 +2235,6 @@ static int dasd_open(struct block_device *bdev, fmode_t mode)
|
|||||||
if (!block)
|
if (!block)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
base = block->base;
|
base = block->base;
|
||||||
atomic_inc(&block->open_count);
|
atomic_inc(&block->open_count);
|
||||||
if (test_bit(DASD_FLAG_OFFLINE, &base->flags)) {
|
if (test_bit(DASD_FLAG_OFFLINE, &base->flags)) {
|
||||||
@ -2271,14 +2269,12 @@ static int dasd_open(struct block_device *bdev, fmode_t mode)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
unlock_kernel();
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
module_put(base->discipline->owner);
|
module_put(base->discipline->owner);
|
||||||
unlock:
|
unlock:
|
||||||
atomic_dec(&block->open_count);
|
atomic_dec(&block->open_count);
|
||||||
unlock_kernel();
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2286,10 +2282,8 @@ static int dasd_release(struct gendisk *disk, fmode_t mode)
|
|||||||
{
|
{
|
||||||
struct dasd_block *block = disk->private_data;
|
struct dasd_block *block = disk->private_data;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
atomic_dec(&block->open_count);
|
atomic_dec(&block->open_count);
|
||||||
module_put(block->base->discipline->owner);
|
module_put(block->base->discipline->owner);
|
||||||
unlock_kernel();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <linux/major.h>
|
#include <linux/major.h>
|
||||||
#include <linux/fs.h>
|
#include <linux/fs.h>
|
||||||
#include <linux/blkpg.h>
|
#include <linux/blkpg.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <asm/compat.h>
|
#include <asm/compat.h>
|
||||||
#include <asm/ccwdev.h>
|
#include <asm/ccwdev.h>
|
||||||
@ -370,9 +369,8 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
int dasd_ioctl(struct block_device *bdev, fmode_t mode,
|
||||||
dasd_do_ioctl(struct block_device *bdev, fmode_t mode,
|
unsigned int cmd, unsigned long arg)
|
||||||
unsigned int cmd, unsigned long arg)
|
|
||||||
{
|
{
|
||||||
struct dasd_block *block = bdev->bd_disk->private_data;
|
struct dasd_block *block = bdev->bd_disk->private_data;
|
||||||
void __user *argp;
|
void __user *argp;
|
||||||
@ -430,14 +428,3 @@ dasd_do_ioctl(struct block_device *bdev, fmode_t mode,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int dasd_ioctl(struct block_device *bdev, fmode_t mode,
|
|
||||||
unsigned int cmd, unsigned long arg)
|
|
||||||
{
|
|
||||||
int rc;
|
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
rc = dasd_do_ioctl(bdev, mode, cmd, arg);
|
|
||||||
unlock_kernel();
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/blkdev.h>
|
#include <linux/blkdev.h>
|
||||||
#include <linux/smp_lock.h>
|
|
||||||
#include <linux/completion.h>
|
#include <linux/completion.h>
|
||||||
#include <linux/interrupt.h>
|
#include <linux/interrupt.h>
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
@ -776,7 +775,6 @@ dcssblk_open(struct block_device *bdev, fmode_t mode)
|
|||||||
struct dcssblk_dev_info *dev_info;
|
struct dcssblk_dev_info *dev_info;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
dev_info = bdev->bd_disk->private_data;
|
dev_info = bdev->bd_disk->private_data;
|
||||||
if (NULL == dev_info) {
|
if (NULL == dev_info) {
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
@ -786,7 +784,6 @@ dcssblk_open(struct block_device *bdev, fmode_t mode)
|
|||||||
bdev->bd_block_size = 4096;
|
bdev->bd_block_size = 4096;
|
||||||
rc = 0;
|
rc = 0;
|
||||||
out:
|
out:
|
||||||
unlock_kernel();
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -797,7 +794,6 @@ dcssblk_release(struct gendisk *disk, fmode_t mode)
|
|||||||
struct segment_info *entry;
|
struct segment_info *entry;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
if (!dev_info) {
|
if (!dev_info) {
|
||||||
rc = -ENODEV;
|
rc = -ENODEV;
|
||||||
goto out;
|
goto out;
|
||||||
@ -815,7 +811,6 @@ dcssblk_release(struct gendisk *disk, fmode_t mode)
|
|||||||
up_write(&dcssblk_devices_sem);
|
up_write(&dcssblk_devices_sem);
|
||||||
rc = 0;
|
rc = 0;
|
||||||
out:
|
out:
|
||||||
unlock_kernel();
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user