aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2019-10-25 11:34:02 +0100
committerMichael S. Tsirkin <mst@redhat.com>2019-10-29 18:56:45 -0400
commit7a064bcc6699151311c2067eea6546da6498ebe7 (patch)
tree91c0ade354204d698d6f11cfd3af5f05b3cc1c15 /hw/virtio
parentf045a0104c8ce38da7f42141a6b3ebf3d74b474b (diff)
downloadqemu-7a064bcc6699151311c2067eea6546da6498ebe7.zip
qemu-7a064bcc6699151311c2067eea6546da6498ebe7.tar.gz
qemu-7a064bcc6699151311c2067eea6546da6498ebe7.tar.bz2
virtio/vhost: Use auto_rcu_read macros
Use RCU_READ_LOCK_GUARD instead of manual rcu_read_(un)lock Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20191025103403.120616-2-dgilbert@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/vhost.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 99de5f1..4da0d5a 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -924,7 +924,7 @@ int vhost_device_iotlb_miss(struct vhost_dev *dev, uint64_t iova, int write)
uint64_t uaddr, len;
int ret = -EFAULT;
- rcu_read_lock();
+ RCU_READ_LOCK_GUARD();
trace_vhost_iotlb_miss(dev, 1);
@@ -956,8 +956,6 @@ int vhost_device_iotlb_miss(struct vhost_dev *dev, uint64_t iova, int write)
trace_vhost_iotlb_miss(dev, 2);
out:
- rcu_read_unlock();
-
return ret;
}