]> Pileus Git - ~andy/linux/blobdiff - drivers/vhost/tcm_vhost.c
vhost: avoid backend flush on vring ops
[~andy/linux] / drivers / vhost / tcm_vhost.c
index ef88844824391c3893641c6841884591b1bdacfe..33e5f90dfcf5c2447fe001b12ecc53d90868d461 100644 (file)
@@ -970,7 +970,10 @@ static long vhost_scsi_ioctl(struct file *f, unsigned int ioctl,
                return vhost_scsi_set_features(vs, features);
        default:
                mutex_lock(&vs->dev.mutex);
-               r = vhost_dev_ioctl(&vs->dev, ioctl, arg);
+               r = vhost_dev_ioctl(&vs->dev, ioctl, argp);
+               /* TODO: flush backend after dev ioctl. */
+               if (r == -ENOIOCTLCMD)
+                       r = vhost_vring_ioctl(&vs->dev, ioctl, argp);
                mutex_unlock(&vs->dev.mutex);
                return r;
        }