summaryrefslogtreecommitdiff
path: root/block/bsg.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2007-07-09 14:39:20 +0400
committerJens Axboe <jens.axboe@oracle.com>2007-07-16 10:52:45 +0400
commit45e79a3acdcf54113b3d7b23e9e64e6541dbfeb5 (patch)
treeb8e7598b26ce446577e162189e635f6b87b10a5b /block/bsg.c
parent7e75d73080d822d2bbbd5b0f7f293719dd1f9109 (diff)
downloadlinux-45e79a3acdcf54113b3d7b23e9e64e6541dbfeb5.tar.xz
bsg: add a request_queue argument to scsi_cmd_ioctl()
bsg uses scsi_cmd_ioctl() for some SCSI/sg ioctl commands. scsi_cmd_ioctl() gets a request queue from a gendisk arguement. This prevents bsg being bound to SCSI devices that don't have a gendisk (like OSD). This adds a request_queue argument to scsi_cmd_ioctl(). The SCSI/sg ioctl commands doesn't use a gendisk so it's safe for any SCSI devices to use scsi_cmd_ioctl(). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/bsg.c')
-rw-r--r--block/bsg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bsg.c b/block/bsg.c
index c85d961ee41e..0427ece9b6d8 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -900,7 +900,7 @@ bsg_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
case SG_EMULATED_HOST:
case SCSI_IOCTL_SEND_COMMAND: {
void __user *uarg = (void __user *) arg;
- return scsi_cmd_ioctl(file, bd->disk, cmd, uarg);
+ return scsi_cmd_ioctl(file, bd->queue, bd->disk, cmd, uarg);
}
case SG_IO: {
struct request *rq;