lkml.org 
[lkml]   [2018]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 22/91] virtio: add ability to iterate over vqs
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Michael S. Tsirkin <mst@redhat.com>

    commit 24a7e4d20783c0514850f24a5c41ede46ab058f0 upstream.

    For cleanup it's helpful to be able to simply scan all vqs and discard
    all data. Add an iterator to do that.

    Cc: stable@vger.kernel.org
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    include/linux/virtio.h | 3 +++
    1 file changed, 3 insertions(+)

    --- a/include/linux/virtio.h
    +++ b/include/linux/virtio.h
    @@ -157,6 +157,9 @@ int virtio_device_freeze(struct virtio_d
    int virtio_device_restore(struct virtio_device *dev);
    #endif

    +#define virtio_device_for_each_vq(vdev, vq) \
    + list_for_each_entry(vq, &vdev->vqs, list)
    +
    /**
    * virtio_driver - operations for a virtio I/O driver
    * @driver: underlying device driver (populate name and owner).

    \
     
     \ /
      Last update: 2018-04-30 22:15    [W:4.039 / U:1.280 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site