[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply
From: |
Vivek Goyal |
Subject: |
[PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply |
Date: |
Tue, 11 May 2021 17:37:36 -0400 |
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@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:
- if (ret == 0) {
- req->reply_sent = true;
- }
-
return ret;
}
--
2.25.4
- [PATCH 0/7] virtiofsd: Few cleanups in virtio_send_data_iov(), Vivek Goyal, 2021/05/11
- [PATCH 5/7] virtiofsd: Simplify skip byte logic, Vivek Goyal, 2021/05/11
- [PATCH 1/7] virtiofsd: Check for EINTR in preadv() and retry, Vivek Goyal, 2021/05/11
- [PATCH 4/7] virtiofsd: get rid of in_sg_left variable, Vivek Goyal, 2021/05/11
- [PATCH 3/7] virtiofsd: Use iov_discard_front() to skip bytes, Vivek Goyal, 2021/05/11
- [PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply,
Vivek Goyal <=
- Re: [PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply, Dr. David Alan Gilbert, 2021/05/18
- [PATCH 6/7] virtiofsd: Check EOF before short read, Vivek Goyal, 2021/05/11
- [PATCH 2/7] virtiofsd: Get rid of unreachable code in read, Vivek Goyal, 2021/05/11
- Re: [PATCH 0/7] virtiofsd: Few cleanups in virtio_send_data_iov(), no-reply, 2021/05/11
- Re: [Virtio-fs] [PATCH 0/7] virtiofsd: Few cleanups in virtio_send_data_iov(), Connor Kuehl, 2021/05/13