[08/16] libceph: remove unused tcp wrappers, now iov_iter is used for messenger
diff mbox series

Message ID 20200421131850.443228-9-rpenyaev@suse.de
State New
Headers show
Series
  • libceph: messenger: send/recv data at one go
Related show

Commit Message

Roman Penyaev April 21, 2020, 1:18 p.m. UTC
Signed-off-by: Roman Penyaev <rpenyaev@suse.de>
---
 net/ceph/messenger.c | 42 ------------------------------------------
 1 file changed, 42 deletions(-)

Patch
diff mbox series

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index b8ea6ce91a27..8f867c8dc481 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -538,48 +538,6 @@  static int ceph_tcp_recviov(struct socket *sock, struct iov_iter *iter)
 	return r;
 }
 
-__attribute__((unused))
-static int ceph_tcp_recvpage(struct socket *sock, struct page *page,
-		     int page_offset, size_t length)
-{
-	struct bio_vec bvec = {
-		.bv_page = page,
-		.bv_offset = page_offset,
-		.bv_len = length
-	};
-	struct msghdr msg = { .msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL };
-	int r;
-
-	BUG_ON(page_offset + length > PAGE_SIZE);
-	iov_iter_bvec(&msg.msg_iter, READ, &bvec, 1, length);
-	r = sock_recvmsg(sock, &msg, msg.msg_flags);
-	if (r == -EAGAIN)
-		r = 0;
-	return r;
-}
-
-/*
- * write something.  @more is true if caller will be sending more data
- * shortly.
- */
-__attribute__((unused))
-static int ceph_tcp_sendmsg(struct socket *sock, struct kvec *iov,
-			    size_t kvlen, size_t len, bool more)
-{
-	struct msghdr msg = { .msg_flags = MSG_DONTWAIT | MSG_NOSIGNAL };
-	int r;
-
-	if (more)
-		msg.msg_flags |= MSG_MORE;
-	else
-		msg.msg_flags |= MSG_EOR;  /* superfluous, but what the hell */
-
-	r = kernel_sendmsg(sock, &msg, iov, kvlen, len);
-	if (r == -EAGAIN)
-		r = 0;
-	return r;
-}
-
 /*
  * @more: either or both of MSG_MORE and MSG_SENDPAGE_NOTLAST
  */