提交 e36b13cc 编写于 作者: A Alex Elder

libceph: only call kernel_sendpage() via helper

Make ceph_tcp_sendpage() be the only place kernel_sendpage() is
used, by using this helper in write_partial_msg_pages().
Signed-off-by: NAlex Elder <elder@dreamhost.com>
Reviewed-by: NSage Weil <sage@newdream.net>
上级 31739139
...@@ -904,17 +904,13 @@ static int write_partial_msg_pages(struct ceph_connection *con) ...@@ -904,17 +904,13 @@ static int write_partial_msg_pages(struct ceph_connection *con)
con->out_msg->footer.data_crc = cpu_to_le32(crc); con->out_msg->footer.data_crc = cpu_to_le32(crc);
con->out_msg_pos.did_page_crc = true; con->out_msg_pos.did_page_crc = true;
} }
ret = kernel_sendpage(con->sock, page, ret = ceph_tcp_sendpage(con->sock, page,
con->out_msg_pos.page_pos + page_shift, con->out_msg_pos.page_pos + page_shift,
len, len, 1);
MSG_DONTWAIT | MSG_NOSIGNAL |
MSG_MORE);
if (do_datacrc && kaddr != zero_page_address) if (do_datacrc && kaddr != zero_page_address)
kunmap(page); kunmap(page);
if (ret == -EAGAIN)
ret = 0;
if (ret <= 0) if (ret <= 0)
goto out; goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册