diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-08-16 06:32:24 +0200 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-08-16 06:32:24 +0200 |
commit | bbcf6e8b66ab2fb5ddab4d0fe40c2e6a5ebe5301 (patch) | |
tree | 071fa9f86dc04a16570be367d04cff3b00c694ad /drivers/block/nbd.c | |
parent | sh: Use __GFP_ZERO for dma_generic_alloc_coherent(). (diff) | |
parent | Linux 2.6.36-rc1 (diff) | |
download | linux-bbcf6e8b66ab2fb5ddab4d0fe40c2e6a5ebe5301.tar.xz linux-bbcf6e8b66ab2fb5ddab4d0fe40c2e6a5ebe5301.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
arch/sh/include/asm/Kbuild
drivers/Makefile
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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 @@ * Note that you can not swap over this thing, yet. Seems to work but * deadlocks sometimes - you can not swap over TCP in general. * - * Copyright 1997-2000, 2008 Pavel Machek <pavel@suse.cz> + * Copyright 1997-2000, 2008 Pavel Machek <pavel@ucw.cz> * Parts copyright 2001 Steven Whitehouse <steve@chygwyn.com> * * This file is released under GPLv2 or later. @@ -24,6 +24,7 @@ #include <linux/errno.h> #include <linux/file.h> #include <linux/ioctl.h> +#include <linux/smp_lock.h> #include <linux/compiler.h> #include <linux/err.h> #include <linux/kernel.h> @@ -448,7 +449,7 @@ static void nbd_clear_que(struct nbd_device *lo) static void nbd_handle_req(struct nbd_device *lo, struct request *req) { - if (!blk_fs_request(req)) + if (req->cmd_type != REQ_TYPE_FS) goto error_out; nbd_cmd(req) = NBD_CMD_READ; @@ -716,9 +717,11 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode, dprintk(DBG_IOCTL, "%s: nbd_ioctl cmd=%s(0x%x) arg=%lu\n", lo->disk->disk_name, ioctl_cmd_to_ascii(cmd), cmd, arg); + lock_kernel(); mutex_lock(&lo->tx_lock); error = __nbd_ioctl(bdev, lo, cmd, arg); mutex_unlock(&lo->tx_lock); + unlock_kernel(); return error; } @@ -726,7 +729,7 @@ static int nbd_ioctl(struct block_device *bdev, fmode_t mode, static const struct block_device_operations nbd_fops = { .owner = THIS_MODULE, - .locked_ioctl = nbd_ioctl, + .ioctl = nbd_ioctl, }; /* |