diff options
author | Eugenio Pérez <eperezma@redhat.com> | 2020-03-31 22:27:57 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2020-04-17 01:31:07 +0300 |
commit | 247643f85782fc1119ccbd712a5075535ebf9d43 (patch) | |
tree | e0b59de23582a4451cb70e559b9e4c025fb7784b /drivers/vhost/test.c | |
parent | 21818ed0c6f08228c7d0f99cb74a934b624665f7 (diff) | |
download | linux-247643f85782fc1119ccbd712a5075535ebf9d43.tar.xz |
vhost: Create accessors for virtqueues private_data
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Link: https://lore.kernel.org/r/20200331192804.6019-2-eperezma@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/test.c')
-rw-r--r-- | drivers/vhost/test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/vhost/test.c b/drivers/vhost/test.c index e37c92d4d7ad..394e2e5c772d 100644 --- a/drivers/vhost/test.c +++ b/drivers/vhost/test.c @@ -49,7 +49,7 @@ static void handle_vq(struct vhost_test *n) void *private; mutex_lock(&vq->mutex); - private = vq->private_data; + private = vhost_vq_get_backend(vq); if (!private) { mutex_unlock(&vq->mutex); return; @@ -133,8 +133,8 @@ static void *vhost_test_stop_vq(struct vhost_test *n, void *private; mutex_lock(&vq->mutex); - private = vq->private_data; - vq->private_data = NULL; + private = vhost_vq_get_backend(vq); + vhost_vq_set_backend(vq, NULL); mutex_unlock(&vq->mutex); return private; } @@ -198,8 +198,8 @@ static long vhost_test_run(struct vhost_test *n, int test) priv = test ? n : NULL; /* start polling new socket */ - oldpriv = vq->private_data; - vq->private_data = priv; + oldpriv = vhost_vq_get_backend(vq); + vhost_vq_set_backend(vq, priv); r = vhost_vq_init_access(&n->vqs[index]); |