On 1/10/2022 11:22 PM, Eli Cohen wrote:
Call reset using the wrapper function vdpa_reset() to make sure the
operation is serialized with cf_mutex.
Signed-off-by: Eli Cohen <elic@xxxxxxxxxx>
---
drivers/vhost/vdpa.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 6e7edaf2472b..fe0bbea4dab6 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -155,7 +155,6 @@ static long vhost_vdpa_get_status(struct vhost_vdpa *v, u8 __user *statusp)
static long vhost_vdpa_set_status(struct vhost_vdpa *v, u8 __user *statusp)
{
struct vdpa_device *vdpa = v->vdpa;
- const struct vdpa_config_ops *ops = vdpa->config;
It is okay to remove this line from the patch, but a follow-up patch to
remove the locking for get_status would need to reintroduce the same
line. If possible please try post these two together in a same series.
Reviewed-by: Si-Wei Liu<si-wei.liu@xxxxxxxxxx>
u8 status, status_old;
int ret, nvqs = v->nvqs;
u16 i;
@@ -177,7 +176,7 @@ static long vhost_vdpa_set_status(struct vhost_vdpa *v, u8 __user *statusp)
vhost_vdpa_unsetup_vq_irq(v, i);
if (status == 0) {
- ret = ops->reset(vdpa);
+ ret = vdpa_reset(vdpa);
if (ret)
return ret;
} else
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization