OSDN Git Service

virtiofsd: Add a helper to send element on virtqueue
authorVivek Goyal <vgoyal@redhat.com>
Thu, 30 Sep 2021 15:30:28 +0000 (11:30 -0400)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Mon, 25 Oct 2021 17:58:20 +0000 (18:58 +0100)
commitc68276556a1e6e035f9a27d0dbb2f87b349f3aea
treea002db6ffe4a3cddfbad12734fbf7c260e2c2112
parenta88abc6f841ea7f0a9c57d69ccf133e2c7d12348
virtiofsd: Add a helper to send element on virtqueue

We have open coded logic to take locks and push element on virtqueue at
three places. Add a helper and use it everywhere. Code is easier to read and
less number of lines of code.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20210930153037.1194279-5-vgoyal@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/fuse_virtio.c