Date: Tue, 18 May 2021 13:32:29 +0100 From: "Dr. David Alan Gilbert" Message-ID: References: <20210511213736.281016-1-vgoyal@redhat.com> <20210511213736.281016-8-vgoyal@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210511213736.281016-8-vgoyal@redhat.com> Subject: Re: [Virtio-fs] [PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply List-Id: Development discussions about virtio-fs List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vivek Goyal Cc: virtio-fs@redhat.com, qemu-devel@nongnu.org * Vivek Goyal (vgoyal@redhat.com) 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 Reviewed-by: Dr. David Alan Gilbert > --- > 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: > - if (ret == 0) { > - req->reply_sent = true; > - } > - > return ret; > } > > -- > 2.25.4 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK