aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:22:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-10 18:22:42 -0400
commit2f9e825d3e0e2b407ae8f082de5c00afcf7378fb (patch)
treef8b3ee40674ce4acd5508a0a0bf52a30904caf6c /drivers/block/nbd.c
parent7ae0dea900b027cd90e8a3e14deca9a19e17638b (diff)
parentde75d60d5ea235e6e09f4962ab22541ce0fe176a (diff)
Merge branch 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.36' of git://git.kernel.dk/linux-2.6-block: (149 commits) block: make sure that REQ_* types are seen even with CONFIG_BLOCK=n xen-blkfront: fix missing out label blkdev: fix blkdev_issue_zeroout return value block: update request stacking methods to support discards block: fix missing export of blk_types.h writeback: fix bad _bh spinlock nesting drbd: revert "delay probes", feature is being re-implemented differently drbd: Initialize all members of sync_conf to their defaults [Bugz 315] drbd: Disable delay probes for the upcomming release writeback: cleanup bdi_register writeback: add new tracepoints writeback: remove unnecessary init_timer call writeback: optimize periodic bdi thread wakeups writeback: prevent unnecessary bdi threads wakeups writeback: move bdi threads exiting logic to the forker thread writeback: restructure bdi forker loop a little writeback: move last_active to bdi writeback: do not remove bdi from bdi_list writeback: simplify bdi code a little writeback: do not lose wake-ups in bdi threads ... Fixed up pretty trivial conflicts in drivers/block/virtio_blk.c and drivers/scsi/scsi_error.c as per Jens.
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r--drivers/block/nbd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 16c3c8613cd3..0daa422aa281 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -24,6 +24,7 @@
24#include <linux/errno.h> 24#include <linux/errno.h>
25#include <linux/file.h> 25#include <linux/file.h>
26#include <linux/ioctl.h> 26#include <linux/ioctl.h>
27#include <linux/smp_lock.h>
27#include <linux/compiler.h> 28#include <linux/compiler.h>
28#include <linux/err.h> 29#include <linux/err.h>
29#include <linux/kernel.h> 30#include <linux/kernel.h>
@@ -448,7 +449,7 @@ static void nbd_clear_que(struct nbd_device *lo)
448 449
449static void nbd_handle_req(struct nbd_device *lo, struct request *req) 450static void nbd_handle_req(struct nbd_device *lo, struct request *req)
450{ 451{
451 if (!blk_fs_request(req)) 452 if (req->cmd_type != REQ_TYPE_FS)
452 goto error_out; 453 goto error_out;
453 454
454 nbd_cmd(req) = NBD_CMD_READ; 455 nbd_cmd(req) = NBD_CMD_READ;
@@ -716,9 +717,11 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode,
716 dprintk(DBG_IOCTL, "%s: nbd_ioctl cmd=%s(0x%x) arg=%lu\n", 717 dprintk(DBG_IOCTL, "%s: nbd_ioctl cmd=%s(0x%x) arg=%lu\n",
717 lo->disk->disk_name, ioctl_cmd_to_ascii(cmd), cmd, arg); 718 lo->disk->disk_name, ioctl_cmd_to_ascii(cmd), cmd, arg);
718 719
720 lock_kernel();
719 mutex_lock(&lo->tx_lock); 721 mutex_lock(&lo->tx_lock);
720 error = __nbd_ioctl(bdev, lo, cmd, arg); 722 error = __nbd_ioctl(bdev, lo, cmd, arg);
721 mutex_unlock(&lo->tx_lock); 723 mutex_unlock(&lo->tx_lock);
724 unlock_kernel();
722 725
723 return error; 726 return error;
724} 727}
@@ -726,7 +729,7 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode,
726static const struct block_device_operations nbd_fops = 729static const struct block_device_operations nbd_fops =
727{ 730{
728 .owner = THIS_MODULE, 731 .owner = THIS_MODULE,
729 .locked_ioctl = nbd_ioctl, 732 .ioctl = nbd_ioctl,
730}; 733};
731 734
732/* 735/*