summaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger_v1.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-05-25 06:11:00 -0400
committerIlya Dryomov <idryomov@gmail.com>2022-10-04 19:18:08 +0200
commitda4ab869e37cf81f93333ba74b16e0ea6d322e15 (patch)
tree543794627c24d2a39e6b4ee1088dae8172ff3423 /net/ceph/messenger_v1.c
parent4fe89d07dcc2804c8b562f6c7896a45643d34b2f (diff)
downloadlinux-da4ab869e37cf81f93333ba74b16e0ea6d322e15.tar.gz
linux-da4ab869e37cf81f93333ba74b16e0ea6d322e15.tar.bz2
linux-da4ab869e37cf81f93333ba74b16e0ea6d322e15.zip
libceph: drop last_piece flag from ceph_msg_data_cursor
ceph_msg_data_next is always passed a NULL pointer for this field. Some of the "next" operations look at it in order to determine the length, but we can just take the min of the data on the page or cursor->resid. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Xiubo Li <xiubli@redhat.com> Reviewed-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph/messenger_v1.c')
-rw-r--r--net/ceph/messenger_v1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ceph/messenger_v1.c b/net/ceph/messenger_v1.c
index 6b014eca3a13..3ddbde87e4d6 100644
--- a/net/ceph/messenger_v1.c
+++ b/net/ceph/messenger_v1.c
@@ -495,7 +495,7 @@ static int write_partial_message_data(struct ceph_connection *con)
continue;
}
- page = ceph_msg_data_next(cursor, &page_offset, &length, NULL);
+ page = ceph_msg_data_next(cursor, &page_offset, &length);
if (length == cursor->total_resid)
more = MSG_MORE;
ret = ceph_tcp_sendpage(con->sock, page, page_offset, length,
@@ -1008,7 +1008,7 @@ static int read_partial_msg_data(struct ceph_connection *con)
continue;
}
- page = ceph_msg_data_next(cursor, &page_offset, &length, NULL);
+ page = ceph_msg_data_next(cursor, &page_offset, &length);
ret = ceph_tcp_recvpage(con->sock, page, page_offset, length);
if (ret <= 0) {
if (do_datacrc)
@@ -1050,7 +1050,7 @@ static int read_partial_msg_data_bounce(struct ceph_connection *con)
continue;
}
- page = ceph_msg_data_next(cursor, &off, &len, NULL);
+ page = ceph_msg_data_next(cursor, &off, &len);
ret = ceph_tcp_recvpage(con->sock, con->bounce_page, 0, len);
if (ret <= 0) {
con->in_data_crc = crc;