mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
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>
This commit is contained in:
parent
4eff3cae9c
commit
d9ecdea7ed
@ -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.
|
* Only allow the generic SCSI ioctls if the host can support it.
|
||||||
*/
|
*/
|
||||||
if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
|
if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))
|
||||||
return -ENOIOCTLCMD;
|
return -ENOTTY;
|
||||||
|
|
||||||
return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
|
return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user