]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
vhost-blk: update after API change
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 6 Dec 2012 13:26:37 +0000 (15:26 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 6 Dec 2012 15:09:19 +0000 (17:09 +0200)
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/blk.c

index e4ca4b61142cb64b5cc886bcdfe80306aea0963c..658c5f9cb6a0c290811f6cd3d90ac8b5807001e7 100644 (file)
@@ -683,10 +683,13 @@ static long vhost_blk_ioctl(struct file *f, unsigned int ioctl,
                return vhost_blk_reset_owner(blk);
        default:
                mutex_lock(&blk->dev.mutex);
-               ret = vhost_dev_ioctl(&blk->dev, ioctl, arg);
+               ret = vhost_vring_ioctl(&blk->dev, ioctl, argp);
                if (!ret && ioctl == VHOST_SET_VRING_NUM)
                        ret = vhost_blk_setup(blk);
-               vhost_blk_flush(blk);
+               else if (ret == -ENOIOCTLCMD) {
+                       ret = vhost_dev_ioctl(&blk->dev, ioctl, argp);
+                       vhost_blk_flush(blk);
+               }
                mutex_unlock(&blk->dev.mutex);
                return ret;
        }