diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-16 13:42:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-16 13:42:58 -0400 |
commit | e4862f2f6f5653dfb67f3ba2b6f0bc74516ed51a (patch) | |
tree | 1db5a0540a4eecfad9b7daee476b985e82ddc810 /drivers/block/nbd.c | |
parent | ec62dbd7eb8e3dddb221da89ecbcea0fc3dee8c1 (diff) | |
parent | b2c1e07b81a126e5846dfc3d36f559d861df59f4 (diff) |
Merge branch 'for-2.6.36' into for-2.6.37
Fairly simple conflicts, the most serious ones are the i.MX ones which I
suspect now need another rename.
Conflicts:
arch/arm/mach-mx2/clock_imx27.c
arch/arm/mach-mx2/devices.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-zoom2.c
sound/soc/fsl/mpc5200_dma.c
sound/soc/fsl/mpc5200_dma.h
sound/soc/fsl/mpc8610_hpcd.c
sound/soc/pxa/spitz.c
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r-- | drivers/block/nbd.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 218d091f3c52..0daa422aa281 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Note that you can not swap over this thing, yet. Seems to work but | 4 | * Note that you can not swap over this thing, yet. Seems to work but |
5 | * deadlocks sometimes - you can not swap over TCP in general. | 5 | * deadlocks sometimes - you can not swap over TCP in general. |
6 | * | 6 | * |
7 | * Copyright 1997-2000, 2008 Pavel Machek <pavel@suse.cz> | 7 | * Copyright 1997-2000, 2008 Pavel Machek <pavel@ucw.cz> |
8 | * Parts copyright 2001 Steven Whitehouse <steve@chygwyn.com> | 8 | * Parts copyright 2001 Steven Whitehouse <steve@chygwyn.com> |
9 | * | 9 | * |
10 | * This file is released under GPLv2 or later. | 10 | * This file is released under GPLv2 or later. |
@@ -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 | ||
449 | static void nbd_handle_req(struct nbd_device *lo, struct request *req) | 450 | static 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, | |||
726 | static const struct block_device_operations nbd_fops = | 729 | static 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 | /* |