Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[linux-block.git] / drivers / vhost / vdpa.c
index cd266fa80c4e2c0fc234b2b078bc7e0e3746ecf6..8c1aefc865f0854ca7c07873a2c757c1688d30f0 100644 (file)
@@ -886,11 +886,7 @@ static void vhost_vdpa_unmap(struct vhost_vdpa *v,
                if (!v->in_batch)
                        ops->set_map(vdpa, asid, iotlb);
        }
-       /* If we are in the middle of batch processing, delay the free
-        * of AS until BATCH_END.
-        */
-       if (!v->in_batch && !iotlb->nmaps)
-               vhost_vdpa_remove_as(v, asid);
+
 }
 
 static int vhost_vdpa_va_map(struct vhost_vdpa *v,
@@ -1147,8 +1143,6 @@ static int vhost_vdpa_process_iotlb_msg(struct vhost_dev *dev, u32 asid,
                if (v->in_batch && ops->set_map)
                        ops->set_map(vdpa, asid, iotlb);
                v->in_batch = false;
-               if (!iotlb->nmaps)
-                       vhost_vdpa_remove_as(v, asid);
                break;
        default:
                r = -EINVAL;
@@ -1175,7 +1169,7 @@ static int vhost_vdpa_alloc_domain(struct vhost_vdpa *v)
        struct vdpa_device *vdpa = v->vdpa;
        const struct vdpa_config_ops *ops = vdpa->config;
        struct device *dma_dev = vdpa_get_dma_dev(vdpa);
-       struct bus_type *bus;
+       const struct bus_type *bus;
        int ret;
 
        /* Device want to do DMA by itself */