From: Christoph Hellwig <hch@lst.de>
To: rusty@rustcorp.com.au
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: [PATCH] virtio_blk: remove BKL leftovers
Date: Wed, 15 Sep 2010 01:27:23 +0200 [thread overview]
Message-ID: <20100914232723.GA14175@lst.de> (raw)
Remove the BKL usage added in "block: push down BKL into .locked_ioctl".
Virtio-blk doesn't use the BKL for anything, and doesn't implement any
ioctl command by itself, but only uses the generic scsi_cmd_ioctl
which is fine without the BKL.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/drivers/block/virtio_blk.c
===================================================================
--- linux-2.6.orig/drivers/block/virtio_blk.c 2010-09-09 18:13:25.171253781 -0300
+++ linux-2.6/drivers/block/virtio_blk.c 2010-09-09 18:14:48.154266565 -0300
@@ -2,7 +2,6 @@
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/blkdev.h>
-#include <linux/smp_lock.h>
#include <linux/hdreg.h>
#include <linux/virtio.h>
#include <linux/virtio_blk.h>
@@ -218,8 +217,8 @@ static int virtblk_get_id(struct gendisk
return blk_execute_rq(vblk->disk->queue, vblk->disk, req, false);
}
-static int virtblk_locked_ioctl(struct block_device *bdev, fmode_t mode,
- unsigned cmd, unsigned long data)
+static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
+ unsigned int cmd, unsigned long data)
{
struct gendisk *disk = bdev->bd_disk;
struct virtio_blk *vblk = disk->private_data;
@@ -234,18 +233,6 @@ static int virtblk_locked_ioctl(struct b
(void __user *)data);
}
-static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
- unsigned int cmd, unsigned long param)
-{
- int ret;
-
- lock_kernel();
- ret = virtblk_locked_ioctl(bdev, mode, cmd, param);
- unlock_kernel();
-
- return ret;
-}
-
/* We provide getgeo only to please some old bootloader/partitioning tools */
static int virtblk_getgeo(struct block_device *bd, struct hd_geometry *geo)
{
next reply other threads:[~2010-09-14 23:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-14 23:27 Christoph Hellwig [this message]
2010-09-15 8:50 ` [PATCH] virtio_blk: remove BKL leftovers Arnd Bergmann
2010-09-16 5:52 ` Rusty Russell
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=20100914232723.GA14175@lst.de \
--to=hch@lst.de \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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