[Devel] [PATCH RHEL9 COMMIT] fs/fuse kio: advance the iov_iter in the kvec branch in do_recv_one_seg()
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Jun 20 17:50:17 MSK 2024
The commit is pushed to "branch-rh9-5.14.0-425.vz9.60.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-425.vz9.60.6
------>
commit 29cd7cfe36564ffa06c9e40abde8768fd2a66e83
Author: Liu Kui <kui.liu at virtuozzo.com>
Date: Thu Jun 20 22:10:09 2024 +0800
fs/fuse kio: advance the iov_iter in the kvec branch in do_recv_one_seg()
iov_iter_advance() was removed from the caller due to fix to the bvec
branch. However it is still needed to handle the kvec branch. Otherwise
it will stuck there forever.
Fixes: 48373aae01e17 ("fs/fuse kio: use iov_iter_get_pages2() + iov_iter_revert()
scheme in do_recv_one_seg()")
https://virtuozzo.atlassian.net/browse/PSBM-157056
Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
Feature: vStorage
---
fs/fuse/kio/pcs/pcs_sock_io.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/fuse/kio/pcs/pcs_sock_io.c b/fs/fuse/kio/pcs/pcs_sock_io.c
index 189cf5c98c7d..29a5c272d6fe 100644
--- a/fs/fuse/kio/pcs/pcs_sock_io.c
+++ b/fs/fuse/kio/pcs/pcs_sock_io.c
@@ -219,9 +219,10 @@ static int do_recv_one_seg(struct socket *sock, struct iov_iter *it, size_t left
kv.iov_len = size;
ret = do_sock_recv(sock, kv.iov_base, kv.iov_len);
- }
+ if (ret > 0)
+ iov_iter_advance(it, ret);
- if (iov_iter_is_bvec(it)) {
+ } else if (iov_iter_is_bvec(it)) {
size_t offset;
ssize_t len;
struct page* page;
More information about the Devel
mailing list