summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2009-06-20 21:29:41 +0200
committerRusty Russell <rusty@rustcorp.com.au>2009-07-17 21:47:46 +0930
commitd9ecdea7ed7467db32ec160f4eca46c279255606 (patch)
treed28aaecc9e06af13baa02e6d36a02e7e8fe58fb1 /drivers/block
parent4eff3cae9c9809720c636e64bc72f212258e0bd5 (diff)
downloadop-kernel-dev-d9ecdea7ed7467db32ec160f4eca46c279255606.zip
op-kernel-dev-d9ecdea7ed7467db32ec160f4eca46c279255606.tar.gz
virtio_blk: ioctl return value fix
Block driver ioctl methods must return ENOTTY and not -ENOIOCTLCMD if they expect the block layer to handle generic ioctls. This triggered a BLKROSET failure in xfsqa #200. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/virtio_blk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 4c47859..fbeefb6 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -213,7 +213,7 @@ static int virtblk_ioctl(struct block_device *bdev, fmode_t mode,
* Only allow the generic SCSI ioctls if the host can support it.
*/
if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
- return -ENOIOCTLCMD;
+ return -ENOTTY;
return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
}
OpenPOWER on IntegriCloud