Skip to content

Commit

Permalink
libceph: only call kernel_sendpage() via helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Elder committed Mar 22, 2012
1 parent 3173913 commit e36b13c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit e36b13c

Please sign in to comment.