hw/virtio: Document virtio_queue_packed_empty_rcu is called within RCU
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 26 Aug 2021 17:26:56 +0000 (19:26 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Sat, 4 Sep 2021 21:34:05 +0000 (17:34 -0400)
While virtio_queue_packed_empty_rcu() uses the '_rcu' suffix,
it is not obvious it is called within rcu_read_lock(). All other
functions from this file called with the RCU locked have a comment
describing it. Document this one similarly for consistency.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210826172658.2116840-2-philmd@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/virtio/virtio.c

index 874377f37a70557f8bd86ea0696c2466d2f623ef..a5214bca6121e4ba5190b99443075166acaf8b0f 100644 (file)
@@ -634,6 +634,7 @@ static int virtio_queue_split_empty(VirtQueue *vq)
     return empty;
 }
 
+/* Called within rcu_read_lock().  */
 static int virtio_queue_packed_empty_rcu(VirtQueue *vq)
 {
     struct VRingPackedDesc desc;