Commit e36b13cceb46136d849aeee06b4907ad3570ba78

Authored by Alex Elder
1 parent 31739139f3

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>

Showing 1 changed file with 2 additions and 6 deletions Side-by-side Diff

net/ceph/messenger.c
... ... @@ -904,17 +904,13 @@
904 904 con->out_msg->footer.data_crc = cpu_to_le32(crc);
905 905 con->out_msg_pos.did_page_crc = true;
906 906 }
907   - ret = kernel_sendpage(con->sock, page,
  907 + ret = ceph_tcp_sendpage(con->sock, page,
908 908 con->out_msg_pos.page_pos + page_shift,
909   - len,
910   - MSG_DONTWAIT | MSG_NOSIGNAL |
911   - MSG_MORE);
  909 + len, 1);
912 910  
913 911 if (do_datacrc && kaddr != zero_page_address)
914 912 kunmap(page);
915 913  
916   - if (ret == -EAGAIN)
917   - ret = 0;
918 914 if (ret <= 0)
919 915 goto out;
920 916