[Devel] [PATCH VZ9] fs/fuse kio: advance the iov_iter in the kvec branch in do_recv_one_seg()
Liu Kui
kui.liu at virtuozzo.com
Thu Jun 20 17:10:09 MSK 2024
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>
---
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;
--
2.39.3 (Apple Git-146)
More information about the Devel
mailing list