git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
virtio_blk: remove BKL leftovers
[pandora-kernel.git]
/
drivers
/
block
/
nbd.c
diff --git
a/drivers/block/nbd.c
b/drivers/block/nbd.c
index
16c3c86
..
0daa422
100644
(file)
--- a/
drivers/block/nbd.c
+++ b/
drivers/block/nbd.c
@@
-24,6
+24,7
@@
#include <linux/errno.h>
#include <linux/file.h>
#include <linux/ioctl.h>
#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>
#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)
{
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;
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);
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);
mutex_lock(&lo->tx_lock);
error = __nbd_ioctl(bdev, lo, cmd, arg);
mutex_unlock(&lo->tx_lock);
+ unlock_kernel();
return error;
}
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,
static const struct block_device_operations nbd_fops =
{
.owner = THIS_MODULE,
- .
locked_ioctl =
nbd_ioctl,
+ .
ioctl =
nbd_ioctl,
};
/*
};
/*