mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 03/18] s390/block: kill the big kernel lock
Date: Tue, 14 Sep 2010 21:40:07 +0200	[thread overview]
Message-ID: <1284493213-7263-4-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1284493139-7233-1-git-send-email-arnd@arndb.de>

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
---
 drivers/s390/block/dasd.c       |    6 ------
 drivers/s390/block/dasd_ioctl.c |   17 ++---------------
 drivers/s390/block/dcssblk.c    |    5 -----
 3 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 8373ca0..38e6fa9 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -21,7 +21,6 @@
 #include <linux/hdreg.h>
 #include <linux/async.h>
 #include <linux/mutex.h>
-#include <linux/smp_lock.h>
 
 #include <asm/ccwdev.h>
 #include <asm/ebcdic.h>
@@ -2236,7 +2235,6 @@ static int dasd_open(struct block_device *bdev, fmode_t mode)
 	if (!block)
 		return -ENODEV;
 
-	lock_kernel();
 	base = block->base;
 	atomic_inc(&block->open_count);
 	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;
 	}
 
-	unlock_kernel();
 	return 0;
 
 out:
 	module_put(base->discipline->owner);
 unlock:
 	atomic_dec(&block->open_count);
-	unlock_kernel();
 	return rc;
 }
 
@@ -2286,10 +2282,8 @@ static int dasd_release(struct gendisk *disk, fmode_t mode)
 {
 	struct dasd_block *block = disk->private_data;
 
-	lock_kernel();
 	atomic_dec(&block->open_count);
 	module_put(block->base->discipline->owner);
-	unlock_kernel();
 	return 0;
 }
 
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index 1557214..26075e9 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -16,7 +16,6 @@
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/blkpg.h>
-#include <linux/smp_lock.h>
 #include <linux/slab.h>
 #include <asm/compat.h>
 #include <asm/ccwdev.h>
@@ -370,9 +369,8 @@ static int dasd_ioctl_readall_cmb(struct dasd_block *block, unsigned int cmd,
 	return ret;
 }
 
-static int
-dasd_do_ioctl(struct block_device *bdev, fmode_t mode,
-	      unsigned int cmd, unsigned long arg)
+int dasd_ioctl(struct block_device *bdev, fmode_t mode,
+	       unsigned int cmd, unsigned long arg)
 {
 	struct dasd_block *block = bdev->bd_disk->private_data;
 	void __user *argp;
@@ -430,14 +428,3 @@ dasd_do_ioctl(struct block_device *bdev, fmode_t mode,
 		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;
-}
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c
index 2bd72aa..9b43ae9 100644
--- a/drivers/s390/block/dcssblk.c
+++ b/drivers/s390/block/dcssblk.c
@@ -14,7 +14,6 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/blkdev.h>
-#include <linux/smp_lock.h>
 #include <linux/completion.h>
 #include <linux/interrupt.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;
 	int rc;
 
-	lock_kernel();
 	dev_info = bdev->bd_disk->private_data;
 	if (NULL == dev_info) {
 		rc = -ENODEV;
@@ -786,7 +784,6 @@ dcssblk_open(struct block_device *bdev, fmode_t mode)
 	bdev->bd_block_size = 4096;
 	rc = 0;
 out:
-	unlock_kernel();
 	return rc;
 }
 
@@ -797,7 +794,6 @@ dcssblk_release(struct gendisk *disk, fmode_t mode)
 	struct segment_info *entry;
 	int rc;
 
-	lock_kernel();
 	if (!dev_info) {
 		rc = -ENODEV;
 		goto out;
@@ -815,7 +811,6 @@ dcssblk_release(struct gendisk *disk, fmode_t mode)
 	up_write(&dcssblk_devices_sem);
 	rc = 0;
 out:
-	unlock_kernel();
 	return rc;
 }
 
-- 
1.7.1


  parent reply	other threads:[~2010-09-14 19:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1284493139-7233-1-git-send-email-arnd@arndb.de>
2010-09-14 19:40 ` [PATCH 00/18] Make the big kernel lock optional Arnd Bergmann
2010-09-14 19:55   ` [PATCH 10/18] uml: kill big kernel lock Arnd Bergmann
2010-09-14 19:55   ` [PATCH 11/18] fix rawctl compat ioctls breakage on amd64 and itanic Arnd Bergmann
2010-09-14 19:55   ` [PATCH 12/18] tlclk: remove big kernel lock Arnd Bergmann
2010-09-14 19:55   ` [PATCH 13/18] i4l: kill " Arnd Bergmann
2010-09-14 19:55   ` [PATCH 14/18] misdn: " Arnd Bergmann
2010-09-14 19:55   ` [PATCH 15/18] dvb/bt8xx: kill the " Arnd Bergmann
2010-09-14 19:55   ` [PATCH 16/18] dvb-core: " Arnd Bergmann
2010-09-14 19:55   ` [PATCH 17/18] rtmutex-tester: make it build without BKL Arnd Bergmann
2010-09-14 19:55   ` [PATCH 18/18] BKL: introduce CONFIG_BKL Arnd Bergmann
2010-09-14 19:40 ` [PATCH 01/18] hpet: kill BKL, add compat_ioctl Arnd Bergmann
2010-09-14 19:40 ` [PATCH 02/18] proc/pci: kill BKL Arnd Bergmann
2010-09-14 19:40 ` Arnd Bergmann [this message]
2010-09-14 19:40 ` [PATCH 04/18] isapnp: BKL removal Arnd Bergmann
2010-09-15  9:31   ` Will Newton
2010-09-14 19:40 ` [PATCH 05/18] alpha: kill big kernel lock Arnd Bergmann
2010-09-14 19:40 ` [PATCH 06/18] cris: autoconvert trivial BKL users Arnd Bergmann
2010-09-14 19:40 ` [PATCH 07/18] m68k: remove big kernel lock Arnd Bergmann
2010-09-14 19:40 ` [PATCH 08/18] parisc: " Arnd Bergmann
2010-09-14 19:40 ` [PATCH 09/18] sh: kill " Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284493213-7263-4-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome