From: Christoph Hellwig Date: Sat, 20 Jun 2009 19:29:41 +0000 (+0200) Subject: virtio_blk: ioctl return value fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d9ecdea7ed7467db32ec160f4eca46c279255606;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Rusty Russell --- diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4c47859ad8b1..fbeefb68a31f 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); }