summaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger.c
diff options
context:
space:
mode:
authorAlex Elder <elder@dreamhost.com>2012-03-07 18:40:08 +0100
committerAlex Elder <elder@dreamhost.com>2012-03-22 16:47:52 +0100
commite36b13cceb46136d849aeee06b4907ad3570ba78 (patch)
treeec2ff06bed82d719c9f68183ac19db483380af33 /net/ceph/messenger.c
parentlibceph: use kernel_sendpage() for sending zeroes (diff)
downloadlinux-e36b13cceb46136d849aeee06b4907ad3570ba78.tar.xz
linux-e36b13cceb46136d849aeee06b4907ad3570ba78.zip
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: Alex Elder <elder@dreamhost.com> Reviewed-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'net/ceph/messenger.c')
-rw-r--r--net/ceph/messenger.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 9207a8c0b214..adca1e6537ab 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -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_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,
- len,
- MSG_DONTWAIT | MSG_NOSIGNAL |
- MSG_MORE);
+ len, 1);
if (do_datacrc && kaddr != zero_page_address)
kunmap(page);
- if (ret == -EAGAIN)
- ret = 0;
if (ret <= 0)
goto out;