]> git.karo-electronics.de Git - linux-beck.git/commitdiff
libceph: only call kernel_sendpage() via helper
authorAlex Elder <elder@dreamhost.com>
Wed, 7 Mar 2012 17:40:08 +0000 (11:40 -0600)
committerAlex Elder <elder@dreamhost.com>
Thu, 22 Mar 2012 15:47:52 +0000 (10:47 -0500)
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>
net/ceph/messenger.c

index 9207a8c0b214027441b3685e0a43e754721479cf..adca1e6537ab0d03290902406e9021336adaf57e 100644 (file)
@@ -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;