[RFC PATCH 15/17] virtiofs: Remove unused used length

From: Xie Yongji
Date: Mon May 17 2021 - 05:12:33 EST


The used length is not used. Let's drop it and
pass NULL to virtqueue_get_buf() instead.

Signed-off-by: Xie Yongji <xieyongji@xxxxxxxxxxxxx>
---
fs/fuse/virtio_fs.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 4ee6f734ba83..e61c94eaa20f 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -322,12 +322,11 @@ static void virtio_fs_hiprio_done_work(struct work_struct *work)
/* Free completed FUSE_FORGET requests */
spin_lock(&fsvq->lock);
do {
- unsigned int len;
void *req;

virtqueue_disable_cb(vq);

- while ((req = virtqueue_get_buf(vq, &len)) != NULL) {
+ while ((req = virtqueue_get_buf(vq, NULL)) != NULL) {
kfree(req);
dec_in_flight_req(fsvq);
}
@@ -600,7 +599,6 @@ static void virtio_fs_requests_done_work(struct work_struct *work)
struct virtqueue *vq = fsvq->vq;
struct fuse_req *req;
struct fuse_req *next;
- unsigned int len;
LIST_HEAD(reqs);

/* Collect completed requests off the virtqueue */
@@ -608,7 +606,7 @@ static void virtio_fs_requests_done_work(struct work_struct *work)
do {
virtqueue_disable_cb(vq);

- while ((req = virtqueue_get_buf(vq, &len)) != NULL) {
+ while ((req = virtqueue_get_buf(vq, NULL)) != NULL) {
spin_lock(&fpq->lock);
list_move_tail(&req->list, &reqs);
spin_unlock(&fpq->lock);
--
2.11.0