[Virtio-fs] [PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply
Connor Kuehl
ckuehl at redhat.com
Thu May 13 20:50:13 UTC 2021
On 5/11/21 4:37 PM, Vivek Goyal wrote:
> There is no reason to set it in label "err". We should be able to set
> it right after sending reply. It is easier to read.
>
> Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
> ---
> tools/virtiofsd/fuse_virtio.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c
> index aa53808ef9..b1767dd5b9 100644
> --- a/tools/virtiofsd/fuse_virtio.c
> +++ b/tools/virtiofsd/fuse_virtio.c
> @@ -446,12 +446,9 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
> vu_queue_notify(dev, q);
> pthread_mutex_unlock(&qi->vq_lock);
> vu_dispatch_unlock(qi->virtio_dev);
> + req->reply_sent = true;
>
> err:
Just a really minor comment: after all these changes, I would venture
that "out" is a more appropriate label name than "err" at this point.
> - if (ret == 0) {
> - req->reply_sent = true;
> - }
> -
> return ret;
> }
>
>
More information about the Virtio-fs
mailing list