aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2015-03-02 02:37:48 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-02 13:06:31 -0500
commit1b784140474e4fc94281a49e96c67d29df0efbde (patch)
tree569e9813ae7ab79616849b117c6b50b3d6e4dabb
parent39a0295f901423e260a034ac7c3211ecaa9c2745 (diff)
net: Remove iocb argument from sendmsg and recvmsg
After TIPC doesn't depend on iocb argument in its internal implementations of sendmsg() and recvmsg() hooks defined in proto structure, no any user is using iocb argument in them at all now. Then we can drop the redundant iocb argument completely from kinds of implementations of both sendmsg() and recvmsg() in the entire networking stack. Cc: Christoph Hellwig <hch@lst.de> Suggested-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--crypto/algif_hash.c8
-rw-r--r--crypto/algif_rng.c4
-rw-r--r--crypto/algif_skcipher.c8
-rw-r--r--drivers/isdn/mISDN/socket.c7
-rw-r--r--drivers/net/macvtap.c9
-rw-r--r--drivers/net/ppp/pppoe.c8
-rw-r--r--drivers/net/tun.c6
-rw-r--r--drivers/vhost/net.c6
-rw-r--r--include/linux/net.h10
-rw-r--r--include/net/af_vsock.h4
-rw-r--r--include/net/bluetooth/bluetooth.h8
-rw-r--r--include/net/inet_common.h7
-rw-r--r--include/net/ping.h7
-rw-r--r--include/net/sock.h16
-rw-r--r--include/net/tcp.h7
-rw-r--r--include/net/udp.h3
-rw-r--r--net/appletalk/ddp.c7
-rw-r--r--net/atm/common.c7
-rw-r--r--net/atm/common.h7
-rw-r--r--net/ax25/af_ax25.c7
-rw-r--r--net/bluetooth/af_bluetooth.c8
-rw-r--r--net/bluetooth/hci_sock.c8
-rw-r--r--net/bluetooth/l2cap_sock.c12
-rw-r--r--net/bluetooth/rfcomm/sock.c10
-rw-r--r--net/bluetooth/sco.c10
-rw-r--r--net/caif/caif_socket.c17
-rw-r--r--net/can/bcm.c7
-rw-r--r--net/can/raw.c7
-rw-r--r--net/core/sock.c13
-rw-r--r--net/dccp/dccp.h8
-rw-r--r--net/dccp/probe.c3
-rw-r--r--net/dccp/proto.c7
-rw-r--r--net/decnet/af_decnet.c7
-rw-r--r--net/ieee802154/socket.c21
-rw-r--r--net/ipv4/af_inet.c11
-rw-r--r--net/ipv4/ping.c7
-rw-r--r--net/ipv4/raw.c7
-rw-r--r--net/ipv4/tcp.c7
-rw-r--r--net/ipv4/udp.c9
-rw-r--r--net/ipv4/udp_impl.h4
-rw-r--r--net/ipv6/ping.c3
-rw-r--r--net/ipv6/raw.c8
-rw-r--r--net/ipv6/udp.c10
-rw-r--r--net/ipv6/udp_impl.h7
-rw-r--r--net/ipx/af_ipx.c7
-rw-r--r--net/irda/af_irda.c29
-rw-r--r--net/iucv/af_iucv.c8
-rw-r--r--net/key/af_key.c6
-rw-r--r--net/l2tp/l2tp_ip.c4
-rw-r--r--net/l2tp/l2tp_ip6.c8
-rw-r--r--net/l2tp/l2tp_ppp.c7
-rw-r--r--net/llc/af_llc.c7
-rw-r--r--net/netlink/af_netlink.c6
-rw-r--r--net/netrom/af_netrom.c7
-rw-r--r--net/nfc/llcp_sock.c8
-rw-r--r--net/nfc/rawsock.c7
-rw-r--r--net/packet/af_packet.c11
-rw-r--r--net/phonet/datagram.c8
-rw-r--r--net/phonet/pep.c8
-rw-r--r--net/phonet/socket.c6
-rw-r--r--net/rds/rds.h7
-rw-r--r--net/rds/recv.c4
-rw-r--r--net/rds/send.c3
-rw-r--r--net/rose/af_rose.c7
-rw-r--r--net/rxrpc/af_rxrpc.c7
-rw-r--r--net/rxrpc/ar-internal.h10
-rw-r--r--net/rxrpc/ar-output.c20
-rw-r--r--net/rxrpc/ar-recvmsg.c4
-rw-r--r--net/sctp/socket.c8
-rw-r--r--net/socket.c78
-rw-r--r--net/tipc/socket.c23
-rw-r--r--net/unix/af_unix.c50
-rw-r--r--net/vmw_vsock/af_vsock.c20
-rw-r--r--net/vmw_vsock/vmci_transport.c3
-rw-r--r--net/x25/af_x25.c6
75 files changed, 302 insertions, 442 deletions
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index 01da360bdb55..0a465e0f3012 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -34,8 +34,8 @@ struct hash_ctx {
34 struct ahash_request req; 34 struct ahash_request req;
35}; 35};
36 36
37static int hash_sendmsg(struct kiocb *unused, struct socket *sock, 37static int hash_sendmsg(struct socket *sock, struct msghdr *msg,
38 struct msghdr *msg, size_t ignored) 38 size_t ignored)
39{ 39{
40 int limit = ALG_MAX_PAGES * PAGE_SIZE; 40 int limit = ALG_MAX_PAGES * PAGE_SIZE;
41 struct sock *sk = sock->sk; 41 struct sock *sk = sock->sk;
@@ -139,8 +139,8 @@ unlock:
139 return err ?: size; 139 return err ?: size;
140} 140}
141 141
142static int hash_recvmsg(struct kiocb *unused, struct socket *sock, 142static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
143 struct msghdr *msg, size_t len, int flags) 143 int flags)
144{ 144{
145 struct sock *sk = sock->sk; 145 struct sock *sk = sock->sk;
146 struct alg_sock *ask = alg_sk(sk); 146 struct alg_sock *ask = alg_sk(sk);
diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c
index 67f612cfed97..3acba0a7cd55 100644
--- a/crypto/algif_rng.c
+++ b/crypto/algif_rng.c
@@ -55,8 +55,8 @@ struct rng_ctx {
55 struct crypto_rng *drng; 55 struct crypto_rng *drng;
56}; 56};
57 57
58static int rng_recvmsg(struct kiocb *unused, struct socket *sock, 58static int rng_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
59 struct msghdr *msg, size_t len, int flags) 59 int flags)
60{ 60{
61 struct sock *sk = sock->sk; 61 struct sock *sk = sock->sk;
62 struct alg_sock *ask = alg_sk(sk); 62 struct alg_sock *ask = alg_sk(sk);
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index 0c8a1e5ccadf..b9743dc35801 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -239,8 +239,8 @@ static void skcipher_data_wakeup(struct sock *sk)
239 rcu_read_unlock(); 239 rcu_read_unlock();
240} 240}
241 241
242static int skcipher_sendmsg(struct kiocb *unused, struct socket *sock, 242static int skcipher_sendmsg(struct socket *sock, struct msghdr *msg,
243 struct msghdr *msg, size_t size) 243 size_t size)
244{ 244{
245 struct sock *sk = sock->sk; 245 struct sock *sk = sock->sk;
246 struct alg_sock *ask = alg_sk(sk); 246 struct alg_sock *ask = alg_sk(sk);
@@ -424,8 +424,8 @@ unlock:
424 return err ?: size; 424 return err ?: size;
425} 425}
426 426
427static int skcipher_recvmsg(struct kiocb *unused, struct socket *sock, 427static int skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
428 struct msghdr *msg, size_t ignored, int flags) 428 size_t ignored, int flags)
429{ 429{
430 struct sock *sk = sock->sk; 430 struct sock *sk = sock->sk;
431 struct alg_sock *ask = alg_sk(sk); 431 struct alg_sock *ask = alg_sk(sk);
diff --git a/drivers/isdn/mISDN/socket.c b/drivers/isdn/mISDN/socket.c
index 84b35925ee4d..8dc7290089bb 100644
--- a/drivers/isdn/mISDN/socket.c
+++ b/drivers/isdn/mISDN/socket.c
@@ -112,8 +112,8 @@ mISDN_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
112} 112}
113 113
114static int 114static int
115mISDN_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 115mISDN_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
116 struct msghdr *msg, size_t len, int flags) 116 int flags)
117{ 117{
118 struct sk_buff *skb; 118 struct sk_buff *skb;
119 struct sock *sk = sock->sk; 119 struct sock *sk = sock->sk;
@@ -173,8 +173,7 @@ mISDN_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
173} 173}
174 174
175static int 175static int
176mISDN_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 176mISDN_sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
177 struct msghdr *msg, size_t len)
178{ 177{
179 struct sock *sk = sock->sk; 178 struct sock *sk = sock->sk;
180 struct sk_buff *skb; 179 struct sk_buff *skb;
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index e40fdfccc9c1..1e51c6bf3ae1 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -1127,16 +1127,15 @@ static const struct file_operations macvtap_fops = {
1127#endif 1127#endif
1128}; 1128};
1129 1129
1130static int macvtap_sendmsg(struct kiocb *iocb, struct socket *sock, 1130static int macvtap_sendmsg(struct socket *sock, struct msghdr *m,
1131 struct msghdr *m, size_t total_len) 1131 size_t total_len)
1132{ 1132{
1133 struct macvtap_queue *q = container_of(sock, struct macvtap_queue, sock); 1133 struct macvtap_queue *q = container_of(sock, struct macvtap_queue, sock);
1134 return macvtap_get_user(q, m, &m->msg_iter, m->msg_flags & MSG_DONTWAIT); 1134 return macvtap_get_user(q, m, &m->msg_iter, m->msg_flags & MSG_DONTWAIT);
1135} 1135}
1136 1136
1137static int macvtap_recvmsg(struct kiocb *iocb, struct socket *sock, 1137static int macvtap_recvmsg(struct socket *sock, struct msghdr *m,
1138 struct msghdr *m, size_t total_len, 1138 size_t total_len, int flags)
1139 int flags)
1140{ 1139{
1141 struct macvtap_queue *q = container_of(sock, struct macvtap_queue, sock); 1140 struct macvtap_queue *q = container_of(sock, struct macvtap_queue, sock);
1142 int ret; 1141 int ret;
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index 9c97e9bcf5f5..ff059e1d8ac6 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -835,8 +835,8 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd,
835 return err; 835 return err;
836} 836}
837 837
838static int pppoe_sendmsg(struct kiocb *iocb, struct socket *sock, 838static int pppoe_sendmsg(struct socket *sock, struct msghdr *m,
839 struct msghdr *m, size_t total_len) 839 size_t total_len)
840{ 840{
841 struct sk_buff *skb; 841 struct sk_buff *skb;
842 struct sock *sk = sock->sk; 842 struct sock *sk = sock->sk;
@@ -977,8 +977,8 @@ static const struct ppp_channel_ops pppoe_chan_ops = {
977 .start_xmit = pppoe_xmit, 977 .start_xmit = pppoe_xmit,
978}; 978};
979 979
980static int pppoe_recvmsg(struct kiocb *iocb, struct socket *sock, 980static int pppoe_recvmsg(struct socket *sock, struct msghdr *m,
981 struct msghdr *m, size_t total_len, int flags) 981 size_t total_len, int flags)
982{ 982{
983 struct sock *sk = sock->sk; 983 struct sock *sk = sock->sk;
984 struct sk_buff *skb; 984 struct sk_buff *skb;
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 857dca47bf80..b96b94cee760 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1448,8 +1448,7 @@ static void tun_sock_write_space(struct sock *sk)
1448 kill_fasync(&tfile->fasync, SIGIO, POLL_OUT); 1448 kill_fasync(&tfile->fasync, SIGIO, POLL_OUT);
1449} 1449}
1450 1450
1451static int tun_sendmsg(struct kiocb *iocb, struct socket *sock, 1451static int tun_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len)
1452 struct msghdr *m, size_t total_len)
1453{ 1452{
1454 int ret; 1453 int ret;
1455 struct tun_file *tfile = container_of(sock, struct tun_file, socket); 1454 struct tun_file *tfile = container_of(sock, struct tun_file, socket);
@@ -1464,8 +1463,7 @@ static int tun_sendmsg(struct kiocb *iocb, struct socket *sock,
1464 return ret; 1463 return ret;
1465} 1464}
1466 1465
1467static int tun_recvmsg(struct kiocb *iocb, struct socket *sock, 1466static int tun_recvmsg(struct socket *sock, struct msghdr *m, size_t total_len,
1468 struct msghdr *m, size_t total_len,
1469 int flags) 1467 int flags)
1470{ 1468{
1471 struct tun_file *tfile = container_of(sock, struct tun_file, socket); 1469 struct tun_file *tfile = container_of(sock, struct tun_file, socket);
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index afa06d28725d..633012cc9a57 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -390,7 +390,7 @@ static void handle_tx(struct vhost_net *net)
390 ubufs = NULL; 390 ubufs = NULL;
391 } 391 }
392 /* TODO: Check specific error and bomb out unless ENOBUFS? */ 392 /* TODO: Check specific error and bomb out unless ENOBUFS? */
393 err = sock->ops->sendmsg(NULL, sock, &msg, len); 393 err = sock->ops->sendmsg(sock, &msg, len);
394 if (unlikely(err < 0)) { 394 if (unlikely(err < 0)) {
395 if (zcopy_used) { 395 if (zcopy_used) {
396 vhost_net_ubuf_put(ubufs); 396 vhost_net_ubuf_put(ubufs);
@@ -566,7 +566,7 @@ static void handle_rx(struct vhost_net *net)
566 /* On overrun, truncate and discard */ 566 /* On overrun, truncate and discard */
567 if (unlikely(headcount > UIO_MAXIOV)) { 567 if (unlikely(headcount > UIO_MAXIOV)) {
568 iov_iter_init(&msg.msg_iter, READ, vq->iov, 1, 1); 568 iov_iter_init(&msg.msg_iter, READ, vq->iov, 1, 1);
569 err = sock->ops->recvmsg(NULL, sock, &msg, 569 err = sock->ops->recvmsg(sock, &msg,
570 1, MSG_DONTWAIT | MSG_TRUNC); 570 1, MSG_DONTWAIT | MSG_TRUNC);
571 pr_debug("Discarded rx packet: len %zd\n", sock_len); 571 pr_debug("Discarded rx packet: len %zd\n", sock_len);
572 continue; 572 continue;
@@ -597,7 +597,7 @@ static void handle_rx(struct vhost_net *net)
597 */ 597 */
598 iov_iter_advance(&fixup, sizeof(hdr)); 598 iov_iter_advance(&fixup, sizeof(hdr));
599 } 599 }
600 err = sock->ops->recvmsg(NULL, sock, &msg, 600 err = sock->ops->recvmsg(sock, &msg,
601 sock_len, MSG_DONTWAIT | MSG_TRUNC); 601 sock_len, MSG_DONTWAIT | MSG_TRUNC);
602 /* Userspace might have consumed the packet meanwhile: 602 /* Userspace might have consumed the packet meanwhile:
603 * it's not supposed to do this usually, but might be hard 603 * it's not supposed to do this usually, but might be hard
diff --git a/include/linux/net.h b/include/linux/net.h
index 17d83393afcc..e74114bcca68 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -120,7 +120,6 @@ struct socket {
120 120
121struct vm_area_struct; 121struct vm_area_struct;
122struct page; 122struct page;
123struct kiocb;
124struct sockaddr; 123struct sockaddr;
125struct msghdr; 124struct msghdr;
126struct module; 125struct module;
@@ -162,8 +161,8 @@ struct proto_ops {
162 int (*compat_getsockopt)(struct socket *sock, int level, 161 int (*compat_getsockopt)(struct socket *sock, int level,
163 int optname, char __user *optval, int __user *optlen); 162 int optname, char __user *optval, int __user *optlen);
164#endif 163#endif
165 int (*sendmsg) (struct kiocb *iocb, struct socket *sock, 164 int (*sendmsg) (struct socket *sock, struct msghdr *m,
166 struct msghdr *m, size_t total_len); 165 size_t total_len);
167 /* Notes for implementing recvmsg: 166 /* Notes for implementing recvmsg:
168 * =============================== 167 * ===============================
169 * msg->msg_namelen should get updated by the recvmsg handlers 168 * msg->msg_namelen should get updated by the recvmsg handlers
@@ -172,9 +171,8 @@ struct proto_ops {
172 * handlers can assume that msg.msg_name is either NULL or has 171 * handlers can assume that msg.msg_name is either NULL or has
173 * a minimum size of sizeof(struct sockaddr_storage). 172 * a minimum size of sizeof(struct sockaddr_storage).
174 */ 173 */
175 int (*recvmsg) (struct kiocb *iocb, struct socket *sock, 174 int (*recvmsg) (struct socket *sock, struct msghdr *m,
176 struct msghdr *m, size_t total_len, 175 size_t total_len, int flags);
177 int flags);
178 int (*mmap) (struct file *file, struct socket *sock, 176 int (*mmap) (struct file *file, struct socket *sock,
179 struct vm_area_struct * vma); 177 struct vm_area_struct * vma);
180 ssize_t (*sendpage) (struct socket *sock, struct page *page, 178 ssize_t (*sendpage) (struct socket *sock, struct page *page,
diff --git a/include/net/af_vsock.h b/include/net/af_vsock.h
index 0d87674fb775..172632dd9930 100644
--- a/include/net/af_vsock.h
+++ b/include/net/af_vsock.h
@@ -100,8 +100,8 @@ struct vsock_transport {
100 100
101 /* DGRAM. */ 101 /* DGRAM. */
102 int (*dgram_bind)(struct vsock_sock *, struct sockaddr_vm *); 102 int (*dgram_bind)(struct vsock_sock *, struct sockaddr_vm *);
103 int (*dgram_dequeue)(struct kiocb *kiocb, struct vsock_sock *vsk, 103 int (*dgram_dequeue)(struct vsock_sock *vsk, struct msghdr *msg,
104 struct msghdr *msg, size_t len, int flags); 104 size_t len, int flags);
105 int (*dgram_enqueue)(struct vsock_sock *, struct sockaddr_vm *, 105 int (*dgram_enqueue)(struct vsock_sock *, struct sockaddr_vm *,
106 struct msghdr *, size_t len); 106 struct msghdr *, size_t len);
107 bool (*dgram_allow)(u32 cid, u32 port); 107 bool (*dgram_allow)(u32 cid, u32 port);
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 4500bf88ff55..6bb97df16d2d 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -245,10 +245,10 @@ int bt_sock_register(int proto, const struct net_proto_family *ops);
245void bt_sock_unregister(int proto); 245void bt_sock_unregister(int proto);
246void bt_sock_link(struct bt_sock_list *l, struct sock *s); 246void bt_sock_link(struct bt_sock_list *l, struct sock *s);
247void bt_sock_unlink(struct bt_sock_list *l, struct sock *s); 247void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
248int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 248int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
249 struct msghdr *msg, size_t len, int flags); 249 int flags);
250int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, 250int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
251 struct msghdr *msg, size_t len, int flags); 251 size_t len, int flags);
252uint bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait); 252uint bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait);
253int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 253int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
254int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo); 254int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo);
diff --git a/include/net/inet_common.h b/include/net/inet_common.h
index b2828a06a5a6..4a92423eefa5 100644
--- a/include/net/inet_common.h
+++ b/include/net/inet_common.h
@@ -21,12 +21,11 @@ int __inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
21int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr, 21int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
22 int addr_len, int flags); 22 int addr_len, int flags);
23int inet_accept(struct socket *sock, struct socket *newsock, int flags); 23int inet_accept(struct socket *sock, struct socket *newsock, int flags);
24int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 24int inet_sendmsg(struct socket *sock, struct msghdr *msg, size_t size);
25 size_t size);
26ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset, 25ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset,
27 size_t size, int flags); 26 size_t size, int flags);
28int inet_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 27int inet_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
29 size_t size, int flags); 28 int flags);
30int inet_shutdown(struct socket *sock, int how); 29int inet_shutdown(struct socket *sock, int how);
31int inet_listen(struct socket *sock, int backlog); 30int inet_listen(struct socket *sock, int backlog);
32void inet_sock_destruct(struct sock *sk); 31void inet_sock_destruct(struct sock *sk);
diff --git a/include/net/ping.h b/include/net/ping.h
index cc16d413f681..ac80cb45e630 100644
--- a/include/net/ping.h
+++ b/include/net/ping.h
@@ -75,12 +75,11 @@ void ping_err(struct sk_buff *skb, int offset, u32 info);
75int ping_getfrag(void *from, char *to, int offset, int fraglen, int odd, 75int ping_getfrag(void *from, char *to, int offset, int fraglen, int odd,
76 struct sk_buff *); 76 struct sk_buff *);
77 77
78int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 78int ping_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
79 size_t len, int noblock, int flags, int *addr_len); 79 int flags, int *addr_len);
80int ping_common_sendmsg(int family, struct msghdr *msg, size_t len, 80int ping_common_sendmsg(int family, struct msghdr *msg, size_t len,
81 void *user_icmph, size_t icmph_len); 81 void *user_icmph, size_t icmph_len);
82int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 82int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len);
83 size_t len);
84int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); 83int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
85bool ping_rcv(struct sk_buff *skb); 84bool ping_rcv(struct sk_buff *skb);
86 85
diff --git a/include/net/sock.h b/include/net/sock.h
index 38369d3580a1..250822cc1e02 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -958,10 +958,9 @@ struct proto {
958 int (*compat_ioctl)(struct sock *sk, 958 int (*compat_ioctl)(struct sock *sk,
959 unsigned int cmd, unsigned long arg); 959 unsigned int cmd, unsigned long arg);
960#endif 960#endif
961 int (*sendmsg)(struct kiocb *iocb, struct sock *sk, 961 int (*sendmsg)(struct sock *sk, struct msghdr *msg,
962 struct msghdr *msg, size_t len); 962 size_t len);
963 int (*recvmsg)(struct kiocb *iocb, struct sock *sk, 963 int (*recvmsg)(struct sock *sk, struct msghdr *msg,
964 struct msghdr *msg,
965 size_t len, int noblock, int flags, 964 size_t len, int noblock, int flags,
966 int *addr_len); 965 int *addr_len);
967 int (*sendpage)(struct sock *sk, struct page *page, 966 int (*sendpage)(struct sock *sk, struct page *page,
@@ -1562,9 +1561,8 @@ int sock_no_listen(struct socket *, int);
1562int sock_no_shutdown(struct socket *, int); 1561int sock_no_shutdown(struct socket *, int);
1563int sock_no_getsockopt(struct socket *, int , int, char __user *, int __user *); 1562int sock_no_getsockopt(struct socket *, int , int, char __user *, int __user *);
1564int sock_no_setsockopt(struct socket *, int, int, char __user *, unsigned int); 1563int sock_no_setsockopt(struct socket *, int, int, char __user *, unsigned int);
1565int sock_no_sendmsg(struct kiocb *, struct socket *, struct msghdr *, size_t); 1564int sock_no_sendmsg(struct socket *, struct msghdr *, size_t);
1566int sock_no_recvmsg(struct kiocb *, struct socket *, struct msghdr *, size_t, 1565int sock_no_recvmsg(struct socket *, struct msghdr *, size_t, int);
1567 int);
1568int sock_no_mmap(struct file *file, struct socket *sock, 1566int sock_no_mmap(struct file *file, struct socket *sock,
1569 struct vm_area_struct *vma); 1567 struct vm_area_struct *vma);
1570ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset, 1568ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset,
@@ -1576,8 +1574,8 @@ ssize_t sock_no_sendpage(struct socket *sock, struct page *page, int offset,
1576 */ 1574 */
1577int sock_common_getsockopt(struct socket *sock, int level, int optname, 1575int sock_common_getsockopt(struct socket *sock, int level, int optname,
1578 char __user *optval, int __user *optlen); 1576 char __user *optval, int __user *optlen);
1579int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock, 1577int sock_common_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1580 struct msghdr *msg, size_t size, int flags); 1578 int flags);
1581int sock_common_setsockopt(struct socket *sock, int level, int optname, 1579int sock_common_setsockopt(struct socket *sock, int level, int optname,
1582 char __user *optval, unsigned int optlen); 1580 char __user *optval, unsigned int optlen);
1583int compat_sock_common_getsockopt(struct socket *sock, int level, 1581int compat_sock_common_getsockopt(struct socket *sock, int level,
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 8d6b983d5099..f87599d5af82 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -349,8 +349,7 @@ void tcp_v4_early_demux(struct sk_buff *skb);
349int tcp_v4_rcv(struct sk_buff *skb); 349int tcp_v4_rcv(struct sk_buff *skb);
350 350
351int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw); 351int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw);
352int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 352int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
353 size_t size);
354int tcp_sendpage(struct sock *sk, struct page *page, int offset, size_t size, 353int tcp_sendpage(struct sock *sk, struct page *page, int offset, size_t size,
355 int flags); 354 int flags);
356void tcp_release_cb(struct sock *sk); 355void tcp_release_cb(struct sock *sk);
@@ -430,8 +429,8 @@ int compat_tcp_setsockopt(struct sock *sk, int level, int optname,
430 char __user *optval, unsigned int optlen); 429 char __user *optval, unsigned int optlen);
431void tcp_set_keepalive(struct sock *sk, int val); 430void tcp_set_keepalive(struct sock *sk, int val);
432void tcp_syn_ack_timeout(struct sock *sk, struct request_sock *req); 431void tcp_syn_ack_timeout(struct sock *sk, struct request_sock *req);
433int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 432int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
434 size_t len, int nonblock, int flags, int *addr_len); 433 int flags, int *addr_len);
435void tcp_parse_options(const struct sk_buff *skb, 434void tcp_parse_options(const struct sk_buff *skb,
436 struct tcp_options_received *opt_rx, 435 struct tcp_options_received *opt_rx,
437 int estab, struct tcp_fastopen_cookie *foc); 436 int estab, struct tcp_fastopen_cookie *foc);
diff --git a/include/net/udp.h b/include/net/udp.h
index 32d8d9f07f76..6d4ed18e1427 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -238,8 +238,7 @@ int udp_get_port(struct sock *sk, unsigned short snum,
238 int (*saddr_cmp)(const struct sock *, 238 int (*saddr_cmp)(const struct sock *,
239 const struct sock *)); 239 const struct sock *));
240void udp_err(struct sk_buff *, u32); 240void udp_err(struct sk_buff *, u32);
241int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 241int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len);
242 size_t len);
243int udp_push_pending_frames(struct sock *sk); 242int udp_push_pending_frames(struct sock *sk);
244void udp_flush_pending_frames(struct sock *sk); 243void udp_flush_pending_frames(struct sock *sk);
245void udp4_hwcsum(struct sk_buff *skb, __be32 src, __be32 dst); 244void udp4_hwcsum(struct sk_buff *skb, __be32 src, __be32 dst);
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 0d0766ea5ab1..3b7ad43c7dad 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -1559,8 +1559,7 @@ freeit:
1559 return 0; 1559 return 0;
1560} 1560}
1561 1561
1562static int atalk_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 1562static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1563 size_t len)
1564{ 1563{
1565 struct sock *sk = sock->sk; 1564 struct sock *sk = sock->sk;
1566 struct atalk_sock *at = at_sk(sk); 1565 struct atalk_sock *at = at_sk(sk);
@@ -1728,8 +1727,8 @@ out:
1728 return err ? : len; 1727 return err ? : len;
1729} 1728}
1730 1729
1731static int atalk_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 1730static int atalk_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1732 size_t size, int flags) 1731 int flags)
1733{ 1732{
1734 struct sock *sk = sock->sk; 1733 struct sock *sk = sock->sk;
1735 struct ddpehdr *ddp; 1734 struct ddpehdr *ddp;
diff --git a/net/atm/common.c b/net/atm/common.c
index b84057e41bd6..ed0466637e13 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -523,8 +523,8 @@ int vcc_connect(struct socket *sock, int itf, short vpi, int vci)
523 return 0; 523 return 0;
524} 524}
525 525
526int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 526int vcc_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
527 size_t size, int flags) 527 int flags)
528{ 528{
529 struct sock *sk = sock->sk; 529 struct sock *sk = sock->sk;
530 struct atm_vcc *vcc; 530 struct atm_vcc *vcc;
@@ -569,8 +569,7 @@ int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
569 return copied; 569 return copied;
570} 570}
571 571
572int vcc_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, 572int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t size)
573 size_t size)
574{ 573{
575 struct sock *sk = sock->sk; 574 struct sock *sk = sock->sk;
576 DEFINE_WAIT(wait); 575 DEFINE_WAIT(wait);
diff --git a/net/atm/common.h b/net/atm/common.h
index cc3c2dae4d79..4d6f5b2068ac 100644
--- a/net/atm/common.h
+++ b/net/atm/common.h
@@ -13,10 +13,9 @@
13int vcc_create(struct net *net, struct socket *sock, int protocol, int family); 13int vcc_create(struct net *net, struct socket *sock, int protocol, int family);
14int vcc_release(struct socket *sock); 14int vcc_release(struct socket *sock);
15int vcc_connect(struct socket *sock, int itf, short vpi, int vci); 15int vcc_connect(struct socket *sock, int itf, short vpi, int vci);
16int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 16int vcc_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
17 size_t size, int flags); 17 int flags);
18int vcc_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, 18int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len);
19 size_t total_len);
20unsigned int vcc_poll(struct file *file, struct socket *sock, poll_table *wait); 19unsigned int vcc_poll(struct file *file, struct socket *sock, poll_table *wait);
21int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 20int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
22int vcc_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg); 21int vcc_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index ca049a7c9287..330c1f4a5a0b 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1432,8 +1432,7 @@ out:
1432 return err; 1432 return err;
1433} 1433}
1434 1434
1435static int ax25_sendmsg(struct kiocb *iocb, struct socket *sock, 1435static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1436 struct msghdr *msg, size_t len)
1437{ 1436{
1438 DECLARE_SOCKADDR(struct sockaddr_ax25 *, usax, msg->msg_name); 1437 DECLARE_SOCKADDR(struct sockaddr_ax25 *, usax, msg->msg_name);
1439 struct sock *sk = sock->sk; 1438 struct sock *sk = sock->sk;
@@ -1599,8 +1598,8 @@ out:
1599 return err; 1598 return err;
1600} 1599}
1601 1600
1602static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock, 1601static int ax25_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1603 struct msghdr *msg, size_t size, int flags) 1602 int flags)
1604{ 1603{
1605 struct sock *sk = sock->sk; 1604 struct sock *sk = sock->sk;
1606 struct sk_buff *skb; 1605 struct sk_buff *skb;
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 4b904c97a068..20a4698e2255 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -210,8 +210,8 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)
210} 210}
211EXPORT_SYMBOL(bt_accept_dequeue); 211EXPORT_SYMBOL(bt_accept_dequeue);
212 212
213int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 213int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
214 struct msghdr *msg, size_t len, int flags) 214 int flags)
215{ 215{
216 int noblock = flags & MSG_DONTWAIT; 216 int noblock = flags & MSG_DONTWAIT;
217 struct sock *sk = sock->sk; 217 struct sock *sk = sock->sk;
@@ -283,8 +283,8 @@ static long bt_sock_data_wait(struct sock *sk, long timeo)
283 return timeo; 283 return timeo;
284} 284}
285 285
286int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, 286int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
287 struct msghdr *msg, size_t size, int flags) 287 size_t size, int flags)
288{ 288{
289 struct sock *sk = sock->sk; 289 struct sock *sk = sock->sk;
290 int err = 0; 290 int err = 0;
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 37198fb99ffe..aa8be4cb19a1 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -826,8 +826,8 @@ static void hci_sock_cmsg(struct sock *sk, struct msghdr *msg,
826 } 826 }
827} 827}
828 828
829static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 829static int hci_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
830 struct msghdr *msg, size_t len, int flags) 830 int flags)
831{ 831{
832 int noblock = flags & MSG_DONTWAIT; 832 int noblock = flags & MSG_DONTWAIT;
833 struct sock *sk = sock->sk; 833 struct sock *sk = sock->sk;
@@ -871,8 +871,8 @@ static int hci_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
871 return err ? : copied; 871 return err ? : copied;
872} 872}
873 873
874static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 874static int hci_sock_sendmsg(struct socket *sock, struct msghdr *msg,
875 struct msghdr *msg, size_t len) 875 size_t len)
876{ 876{
877 struct sock *sk = sock->sk; 877 struct sock *sk = sock->sk;
878 struct hci_dev *hdev; 878 struct hci_dev *hdev;
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 60694f0f4c73..9070720eedc8 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -944,8 +944,8 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
944 return err; 944 return err;
945} 945}
946 946
947static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 947static int l2cap_sock_sendmsg(struct socket *sock, struct msghdr *msg,
948 struct msghdr *msg, size_t len) 948 size_t len)
949{ 949{
950 struct sock *sk = sock->sk; 950 struct sock *sk = sock->sk;
951 struct l2cap_chan *chan = l2cap_pi(sk)->chan; 951 struct l2cap_chan *chan = l2cap_pi(sk)->chan;
@@ -976,8 +976,8 @@ static int l2cap_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
976 return err; 976 return err;
977} 977}
978 978
979static int l2cap_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 979static int l2cap_sock_recvmsg(struct socket *sock, struct msghdr *msg,
980 struct msghdr *msg, size_t len, int flags) 980 size_t len, int flags)
981{ 981{
982 struct sock *sk = sock->sk; 982 struct sock *sk = sock->sk;
983 struct l2cap_pinfo *pi = l2cap_pi(sk); 983 struct l2cap_pinfo *pi = l2cap_pi(sk);
@@ -1004,9 +1004,9 @@ static int l2cap_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
1004 release_sock(sk); 1004 release_sock(sk);
1005 1005
1006 if (sock->type == SOCK_STREAM) 1006 if (sock->type == SOCK_STREAM)
1007 err = bt_sock_stream_recvmsg(iocb, sock, msg, len, flags); 1007 err = bt_sock_stream_recvmsg(sock, msg, len, flags);
1008 else 1008 else
1009 err = bt_sock_recvmsg(iocb, sock, msg, len, flags); 1009 err = bt_sock_recvmsg(sock, msg, len, flags);
1010 1010
1011 if (pi->chan->mode != L2CAP_MODE_ERTM) 1011 if (pi->chan->mode != L2CAP_MODE_ERTM)
1012 return err; 1012 return err;
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 3c6d2c8ac1a4..825e8fb5114b 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -549,8 +549,8 @@ static int rfcomm_sock_getname(struct socket *sock, struct sockaddr *addr, int *
549 return 0; 549 return 0;
550} 550}
551 551
552static int rfcomm_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 552static int rfcomm_sock_sendmsg(struct socket *sock, struct msghdr *msg,
553 struct msghdr *msg, size_t len) 553 size_t len)
554{ 554{
555 struct sock *sk = sock->sk; 555 struct sock *sk = sock->sk;
556 struct rfcomm_dlc *d = rfcomm_pi(sk)->dlc; 556 struct rfcomm_dlc *d = rfcomm_pi(sk)->dlc;
@@ -615,8 +615,8 @@ done:
615 return sent; 615 return sent;
616} 616}
617 617
618static int rfcomm_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 618static int rfcomm_sock_recvmsg(struct socket *sock, struct msghdr *msg,
619 struct msghdr *msg, size_t size, int flags) 619 size_t size, int flags)
620{ 620{
621 struct sock *sk = sock->sk; 621 struct sock *sk = sock->sk;
622 struct rfcomm_dlc *d = rfcomm_pi(sk)->dlc; 622 struct rfcomm_dlc *d = rfcomm_pi(sk)->dlc;
@@ -627,7 +627,7 @@ static int rfcomm_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
627 return 0; 627 return 0;
628 } 628 }
629 629
630 len = bt_sock_stream_recvmsg(iocb, sock, msg, size, flags); 630 len = bt_sock_stream_recvmsg(sock, msg, size, flags);
631 631
632 lock_sock(sk); 632 lock_sock(sk);
633 if (!(flags & MSG_PEEK) && len > 0) 633 if (!(flags & MSG_PEEK) && len > 0)
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 76321b546e84..2bb7ef46bb99 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -688,8 +688,8 @@ static int sco_sock_getname(struct socket *sock, struct sockaddr *addr, int *len
688 return 0; 688 return 0;
689} 689}
690 690
691static int sco_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 691static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg,
692 struct msghdr *msg, size_t len) 692 size_t len)
693{ 693{
694 struct sock *sk = sock->sk; 694 struct sock *sk = sock->sk;
695 int err; 695 int err;
@@ -758,8 +758,8 @@ static void sco_conn_defer_accept(struct hci_conn *conn, u16 setting)
758 } 758 }
759} 759}
760 760
761static int sco_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 761static int sco_sock_recvmsg(struct socket *sock, struct msghdr *msg,
762 struct msghdr *msg, size_t len, int flags) 762 size_t len, int flags)
763{ 763{
764 struct sock *sk = sock->sk; 764 struct sock *sk = sock->sk;
765 struct sco_pinfo *pi = sco_pi(sk); 765 struct sco_pinfo *pi = sco_pi(sk);
@@ -777,7 +777,7 @@ static int sco_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
777 777
778 release_sock(sk); 778 release_sock(sk);
779 779
780 return bt_sock_recvmsg(iocb, sock, msg, len, flags); 780 return bt_sock_recvmsg(sock, msg, len, flags);
781} 781}
782 782
783static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) 783static int sco_sock_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen)
diff --git a/net/caif/caif_socket.c b/net/caif/caif_socket.c
index 769b185fefbd..b6bf51bb187d 100644
--- a/net/caif/caif_socket.c
+++ b/net/caif/caif_socket.c
@@ -271,8 +271,8 @@ static void caif_check_flow_release(struct sock *sk)
271 * Copied from unix_dgram_recvmsg, but removed credit checks, 271 * Copied from unix_dgram_recvmsg, but removed credit checks,
272 * changed locking, address handling and added MSG_TRUNC. 272 * changed locking, address handling and added MSG_TRUNC.
273 */ 273 */
274static int caif_seqpkt_recvmsg(struct kiocb *iocb, struct socket *sock, 274static int caif_seqpkt_recvmsg(struct socket *sock, struct msghdr *m,
275 struct msghdr *m, size_t len, int flags) 275 size_t len, int flags)
276 276
277{ 277{
278 struct sock *sk = sock->sk; 278 struct sock *sk = sock->sk;
@@ -343,9 +343,8 @@ static long caif_stream_data_wait(struct sock *sk, long timeo)
343 * Copied from unix_stream_recvmsg, but removed credit checks, 343 * Copied from unix_stream_recvmsg, but removed credit checks,
344 * changed locking calls, changed address handling. 344 * changed locking calls, changed address handling.
345 */ 345 */
346static int caif_stream_recvmsg(struct kiocb *iocb, struct socket *sock, 346static int caif_stream_recvmsg(struct socket *sock, struct msghdr *msg,
347 struct msghdr *msg, size_t size, 347 size_t size, int flags)
348 int flags)
349{ 348{
350 struct sock *sk = sock->sk; 349 struct sock *sk = sock->sk;
351 int copied = 0; 350 int copied = 0;
@@ -511,8 +510,8 @@ static int transmit_skb(struct sk_buff *skb, struct caifsock *cf_sk,
511} 510}
512 511
513/* Copied from af_unix:unix_dgram_sendmsg, and adapted to CAIF */ 512/* Copied from af_unix:unix_dgram_sendmsg, and adapted to CAIF */
514static int caif_seqpkt_sendmsg(struct kiocb *kiocb, struct socket *sock, 513static int caif_seqpkt_sendmsg(struct socket *sock, struct msghdr *msg,
515 struct msghdr *msg, size_t len) 514 size_t len)
516{ 515{
517 struct sock *sk = sock->sk; 516 struct sock *sk = sock->sk;
518 struct caifsock *cf_sk = container_of(sk, struct caifsock, sk); 517 struct caifsock *cf_sk = container_of(sk, struct caifsock, sk);
@@ -586,8 +585,8 @@ err:
586 * Changed removed permission handling and added waiting for flow on 585 * Changed removed permission handling and added waiting for flow on
587 * and other minor adaptations. 586 * and other minor adaptations.
588 */ 587 */
589static int caif_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, 588static int caif_stream_sendmsg(struct socket *sock, struct msghdr *msg,
590 struct msghdr *msg, size_t len) 589 size_t len)
591{ 590{
592 struct sock *sk = sock->sk; 591 struct sock *sk = sock->sk;
593 struct caifsock *cf_sk = container_of(sk, struct caifsock, sk); 592 struct caifsock *cf_sk = container_of(sk, struct caifsock, sk);
diff --git a/net/can/bcm.c b/net/can/bcm.c
index d559f922326d..b523453585be 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -1231,8 +1231,7 @@ static int bcm_tx_send(struct msghdr *msg, int ifindex, struct sock *sk)
1231/* 1231/*
1232 * bcm_sendmsg - process BCM commands (opcodes) from the userspace 1232 * bcm_sendmsg - process BCM commands (opcodes) from the userspace
1233 */ 1233 */
1234static int bcm_sendmsg(struct kiocb *iocb, struct socket *sock, 1234static int bcm_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
1235 struct msghdr *msg, size_t size)
1236{ 1235{
1237 struct sock *sk = sock->sk; 1236 struct sock *sk = sock->sk;
1238 struct bcm_sock *bo = bcm_sk(sk); 1237 struct bcm_sock *bo = bcm_sk(sk);
@@ -1535,8 +1534,8 @@ static int bcm_connect(struct socket *sock, struct sockaddr *uaddr, int len,
1535 return 0; 1534 return 0;
1536} 1535}
1537 1536
1538static int bcm_recvmsg(struct kiocb *iocb, struct socket *sock, 1537static int bcm_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1539 struct msghdr *msg, size_t size, int flags) 1538 int flags)
1540{ 1539{
1541 struct sock *sk = sock->sk; 1540 struct sock *sk = sock->sk;
1542 struct sk_buff *skb; 1541 struct sk_buff *skb;
diff --git a/net/can/raw.c b/net/can/raw.c
index 94601b7ff0a3..63ffdb0f3a23 100644
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -658,8 +658,7 @@ static int raw_getsockopt(struct socket *sock, int level, int optname,
658 return 0; 658 return 0;
659} 659}
660 660
661static int raw_sendmsg(struct kiocb *iocb, struct socket *sock, 661static int raw_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
662 struct msghdr *msg, size_t size)
663{ 662{
664 struct sock *sk = sock->sk; 663 struct sock *sk = sock->sk;
665 struct raw_sock *ro = raw_sk(sk); 664 struct raw_sock *ro = raw_sk(sk);
@@ -728,8 +727,8 @@ send_failed:
728 return err; 727 return err;
729} 728}
730 729
731static int raw_recvmsg(struct kiocb *iocb, struct socket *sock, 730static int raw_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
732 struct msghdr *msg, size_t size, int flags) 731 int flags)
733{ 732{
734 struct sock *sk = sock->sk; 733 struct sock *sk = sock->sk;
735 struct sk_buff *skb; 734 struct sk_buff *skb;
diff --git a/net/core/sock.c b/net/core/sock.c
index 9c74fc8f0e32..726e1f99aa8d 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2163,15 +2163,14 @@ int sock_no_getsockopt(struct socket *sock, int level, int optname,
2163} 2163}
2164EXPORT_SYMBOL(sock_no_getsockopt); 2164EXPORT_SYMBOL(sock_no_getsockopt);
2165 2165
2166int sock_no_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, 2166int sock_no_sendmsg(struct socket *sock, struct msghdr *m, size_t len)
2167 size_t len)
2168{ 2167{
2169 return -EOPNOTSUPP; 2168 return -EOPNOTSUPP;
2170} 2169}
2171EXPORT_SYMBOL(sock_no_sendmsg); 2170EXPORT_SYMBOL(sock_no_sendmsg);
2172 2171
2173int sock_no_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, 2172int sock_no_recvmsg(struct socket *sock, struct msghdr *m, size_t len,
2174 size_t len, int flags) 2173 int flags)
2175{ 2174{
2176 return -EOPNOTSUPP; 2175 return -EOPNOTSUPP;
2177} 2176}
@@ -2543,14 +2542,14 @@ int compat_sock_common_getsockopt(struct socket *sock, int level, int optname,
2543EXPORT_SYMBOL(compat_sock_common_getsockopt); 2542EXPORT_SYMBOL(compat_sock_common_getsockopt);
2544#endif 2543#endif
2545 2544
2546int sock_common_recvmsg(struct kiocb *iocb, struct socket *sock, 2545int sock_common_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
2547 struct msghdr *msg, size_t size, int flags) 2546 int flags)
2548{ 2547{
2549 struct sock *sk = sock->sk; 2548 struct sock *sk = sock->sk;
2550 int addr_len = 0; 2549 int addr_len = 0;
2551 int err; 2550 int err;
2552 2551
2553 err = sk->sk_prot->recvmsg(iocb, sk, msg, size, flags & MSG_DONTWAIT, 2552 err = sk->sk_prot->recvmsg(sk, msg, size, flags & MSG_DONTWAIT,
2554 flags & ~MSG_DONTWAIT, &addr_len); 2553 flags & ~MSG_DONTWAIT, &addr_len);
2555 if (err >= 0) 2554 if (err >= 0)
2556 msg->msg_namelen = addr_len; 2555 msg->msg_namelen = addr_len;
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index e4c144fa706f..3b1d64d6e093 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -310,11 +310,9 @@ int compat_dccp_setsockopt(struct sock *sk, int level, int optname,
310 char __user *optval, unsigned int optlen); 310 char __user *optval, unsigned int optlen);
311#endif 311#endif
312int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg); 312int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg);
313int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 313int dccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
314 size_t size); 314int dccp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
315int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, 315 int flags, int *addr_len);
316 struct msghdr *msg, size_t len, int nonblock, int flags,
317 int *addr_len);
318void dccp_shutdown(struct sock *sk, int how); 316void dccp_shutdown(struct sock *sk, int how);
319int inet_dccp_listen(struct socket *sock, int backlog); 317int inet_dccp_listen(struct socket *sock, int backlog);
320unsigned int dccp_poll(struct file *file, struct socket *sock, 318unsigned int dccp_poll(struct file *file, struct socket *sock,
diff --git a/net/dccp/probe.c b/net/dccp/probe.c
index 595ddf0459db..d8346d0eadeb 100644
--- a/net/dccp/probe.c
+++ b/net/dccp/probe.c
@@ -72,8 +72,7 @@ static void printl(const char *fmt, ...)
72 wake_up(&dccpw.wait); 72 wake_up(&dccpw.wait);
73} 73}
74 74
75static int jdccp_sendmsg(struct kiocb *iocb, struct sock *sk, 75static int jdccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
76 struct msghdr *msg, size_t size)
77{ 76{
78 const struct inet_sock *inet = inet_sk(sk); 77 const struct inet_sock *inet = inet_sk(sk);
79 struct ccid3_hc_tx_sock *hc = NULL; 78 struct ccid3_hc_tx_sock *hc = NULL;
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index e171b780b499..52a94016526d 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -741,8 +741,7 @@ static int dccp_msghdr_parse(struct msghdr *msg, struct sk_buff *skb)
741 return 0; 741 return 0;
742} 742}
743 743
744int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 744int dccp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
745 size_t len)
746{ 745{
747 const struct dccp_sock *dp = dccp_sk(sk); 746 const struct dccp_sock *dp = dccp_sk(sk);
748 const int flags = msg->msg_flags; 747 const int flags = msg->msg_flags;
@@ -806,8 +805,8 @@ out_discard:
806 805
807EXPORT_SYMBOL_GPL(dccp_sendmsg); 806EXPORT_SYMBOL_GPL(dccp_sendmsg);
808 807
809int dccp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 808int dccp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
810 size_t len, int nonblock, int flags, int *addr_len) 809 int flags, int *addr_len)
811{ 810{
812 const struct dccp_hdr *dh; 811 const struct dccp_hdr *dh;
813 long timeo; 812 long timeo;
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 810228646de3..754484b3cd0e 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -1669,8 +1669,8 @@ static int dn_data_ready(struct sock *sk, struct sk_buff_head *q, int flags, int
1669} 1669}
1670 1670
1671 1671
1672static int dn_recvmsg(struct kiocb *iocb, struct socket *sock, 1672static int dn_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1673 struct msghdr *msg, size_t size, int flags) 1673 int flags)
1674{ 1674{
1675 struct sock *sk = sock->sk; 1675 struct sock *sk = sock->sk;
1676 struct dn_scp *scp = DN_SK(sk); 1676 struct dn_scp *scp = DN_SK(sk);
@@ -1905,8 +1905,7 @@ static inline struct sk_buff *dn_alloc_send_pskb(struct sock *sk,
1905 return skb; 1905 return skb;
1906} 1906}
1907 1907
1908static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, 1908static int dn_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
1909 struct msghdr *msg, size_t size)
1910{ 1909{
1911 struct sock *sk = sock->sk; 1910 struct sock *sk = sock->sk;
1912 struct dn_scp *scp = DN_SK(sk); 1911 struct dn_scp *scp = DN_SK(sk);
diff --git a/net/ieee802154/socket.c b/net/ieee802154/socket.c
index 2878d8ca6d3b..b60c65f70346 100644
--- a/net/ieee802154/socket.c
+++ b/net/ieee802154/socket.c
@@ -98,12 +98,12 @@ static int ieee802154_sock_release(struct socket *sock)
98 return 0; 98 return 0;
99} 99}
100 100
101static int ieee802154_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 101static int ieee802154_sock_sendmsg(struct socket *sock, struct msghdr *msg,
102 struct msghdr *msg, size_t len) 102 size_t len)
103{ 103{
104 struct sock *sk = sock->sk; 104 struct sock *sk = sock->sk;
105 105
106 return sk->sk_prot->sendmsg(iocb, sk, msg, len); 106 return sk->sk_prot->sendmsg(sk, msg, len);
107} 107}
108 108
109static int ieee802154_sock_bind(struct socket *sock, struct sockaddr *uaddr, 109static int ieee802154_sock_bind(struct socket *sock, struct sockaddr *uaddr,
@@ -255,8 +255,7 @@ static int raw_disconnect(struct sock *sk, int flags)
255 return 0; 255 return 0;
256} 256}
257 257
258static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, 258static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
259 struct msghdr *msg, size_t size)
260{ 259{
261 struct net_device *dev; 260 struct net_device *dev;
262 unsigned int mtu; 261 unsigned int mtu;
@@ -327,8 +326,8 @@ out:
327 return err; 326 return err;
328} 327}
329 328
330static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 329static int raw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
331 size_t len, int noblock, int flags, int *addr_len) 330 int noblock, int flags, int *addr_len)
332{ 331{
333 size_t copied = 0; 332 size_t copied = 0;
334 int err = -EOPNOTSUPP; 333 int err = -EOPNOTSUPP;
@@ -615,8 +614,7 @@ static int dgram_disconnect(struct sock *sk, int flags)
615 return 0; 614 return 0;
616} 615}
617 616
618static int dgram_sendmsg(struct kiocb *iocb, struct sock *sk, 617static int dgram_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
619 struct msghdr *msg, size_t size)
620{ 618{
621 struct net_device *dev; 619 struct net_device *dev;
622 unsigned int mtu; 620 unsigned int mtu;
@@ -715,9 +713,8 @@ out:
715 return err; 713 return err;
716} 714}
717 715
718static int dgram_recvmsg(struct kiocb *iocb, struct sock *sk, 716static int dgram_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
719 struct msghdr *msg, size_t len, int noblock, 717 int noblock, int flags, int *addr_len)
720 int flags, int *addr_len)
721{ 718{
722 size_t copied = 0; 719 size_t copied = 0;
723 int err = -EOPNOTSUPP; 720 int err = -EOPNOTSUPP;
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 4ce954cc94a4..64a9c0fdc4aa 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -716,8 +716,7 @@ int inet_getname(struct socket *sock, struct sockaddr *uaddr,
716} 716}
717EXPORT_SYMBOL(inet_getname); 717EXPORT_SYMBOL(inet_getname);
718 718
719int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 719int inet_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
720 size_t size)
721{ 720{
722 struct sock *sk = sock->sk; 721 struct sock *sk = sock->sk;
723 722
@@ -728,7 +727,7 @@ int inet_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
728 inet_autobind(sk)) 727 inet_autobind(sk))
729 return -EAGAIN; 728 return -EAGAIN;
730 729
731 return sk->sk_prot->sendmsg(iocb, sk, msg, size); 730 return sk->sk_prot->sendmsg(sk, msg, size);
732} 731}
733EXPORT_SYMBOL(inet_sendmsg); 732EXPORT_SYMBOL(inet_sendmsg);
734 733
@@ -750,8 +749,8 @@ ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset,
750} 749}
751EXPORT_SYMBOL(inet_sendpage); 750EXPORT_SYMBOL(inet_sendpage);
752 751
753int inet_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 752int inet_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
754 size_t size, int flags) 753 int flags)
755{ 754{
756 struct sock *sk = sock->sk; 755 struct sock *sk = sock->sk;
757 int addr_len = 0; 756 int addr_len = 0;
@@ -759,7 +758,7 @@ int inet_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
759 758
760 sock_rps_record_flow(sk); 759 sock_rps_record_flow(sk);
761 760
762 err = sk->sk_prot->recvmsg(iocb, sk, msg, size, flags & MSG_DONTWAIT, 761 err = sk->sk_prot->recvmsg(sk, msg, size, flags & MSG_DONTWAIT,
763 flags & ~MSG_DONTWAIT, &addr_len); 762 flags & ~MSG_DONTWAIT, &addr_len);
764 if (err >= 0) 763 if (err >= 0)
765 msg->msg_namelen = addr_len; 764 msg->msg_namelen = addr_len;
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index e9f66e1cda50..3648e7f32f3d 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -684,8 +684,7 @@ int ping_common_sendmsg(int family, struct msghdr *msg, size_t len,
684} 684}
685EXPORT_SYMBOL_GPL(ping_common_sendmsg); 685EXPORT_SYMBOL_GPL(ping_common_sendmsg);
686 686
687static int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 687static int ping_v4_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
688 size_t len)
689{ 688{
690 struct net *net = sock_net(sk); 689 struct net *net = sock_net(sk);
691 struct flowi4 fl4; 690 struct flowi4 fl4;
@@ -841,8 +840,8 @@ do_confirm:
841 goto out; 840 goto out;
842} 841}
843 842
844int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 843int ping_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
845 size_t len, int noblock, int flags, int *addr_len) 844 int flags, int *addr_len)
846{ 845{
847 struct inet_sock *isk = inet_sk(sk); 846 struct inet_sock *isk = inet_sk(sk);
848 int family = sk->sk_family; 847 int family = sk->sk_family;
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index f027a708b7e0..923cf538fce1 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -481,8 +481,7 @@ static int raw_getfrag(void *from, char *to, int offset, int len, int odd,
481 return ip_generic_getfrag(rfv->msg, to, offset, len, odd, skb); 481 return ip_generic_getfrag(rfv->msg, to, offset, len, odd, skb);
482} 482}
483 483
484static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 484static int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
485 size_t len)
486{ 485{
487 struct inet_sock *inet = inet_sk(sk); 486 struct inet_sock *inet = inet_sk(sk);
488 struct ipcm_cookie ipc; 487 struct ipcm_cookie ipc;
@@ -709,8 +708,8 @@ out: return ret;
709 * we return it, otherwise we block. 708 * we return it, otherwise we block.
710 */ 709 */
711 710
712static int raw_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 711static int raw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
713 size_t len, int noblock, int flags, int *addr_len) 712 int noblock, int flags, int *addr_len)
714{ 713{
715 struct inet_sock *inet = inet_sk(sk); 714 struct inet_sock *inet = inet_sk(sk);
716 size_t copied = 0; 715 size_t copied = 0;
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 4b57ea8dabc7..d939c35001f9 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1064,8 +1064,7 @@ static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg,
1064 return err; 1064 return err;
1065} 1065}
1066 1066
1067int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 1067int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size)
1068 size_t size)
1069{ 1068{
1070 struct tcp_sock *tp = tcp_sk(sk); 1069 struct tcp_sock *tp = tcp_sk(sk);
1071 struct sk_buff *skb; 1070 struct sk_buff *skb;
@@ -1543,8 +1542,8 @@ EXPORT_SYMBOL(tcp_read_sock);
1543 * Probably, code can be easily improved even more. 1542 * Probably, code can be easily improved even more.
1544 */ 1543 */
1545 1544
1546int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 1545int tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int nonblock,
1547 size_t len, int nonblock, int flags, int *addr_len) 1546 int flags, int *addr_len)
1548{ 1547{
1549 struct tcp_sock *tp = tcp_sk(sk); 1548 struct tcp_sock *tp = tcp_sk(sk);
1550 int copied = 0; 1549 int copied = 0;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 0224f930c613..f27556e2158b 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -873,8 +873,7 @@ out:
873} 873}
874EXPORT_SYMBOL(udp_push_pending_frames); 874EXPORT_SYMBOL(udp_push_pending_frames);
875 875
876int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 876int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
877 size_t len)
878{ 877{
879 struct inet_sock *inet = inet_sk(sk); 878 struct inet_sock *inet = inet_sk(sk);
880 struct udp_sock *up = udp_sk(sk); 879 struct udp_sock *up = udp_sk(sk);
@@ -1136,7 +1135,7 @@ int udp_sendpage(struct sock *sk, struct page *page, int offset,
1136 * sendpage interface can't pass. 1135 * sendpage interface can't pass.
1137 * This will succeed only when the socket is connected. 1136 * This will succeed only when the socket is connected.
1138 */ 1137 */
1139 ret = udp_sendmsg(NULL, sk, &msg, 0); 1138 ret = udp_sendmsg(sk, &msg, 0);
1140 if (ret < 0) 1139 if (ret < 0)
1141 return ret; 1140 return ret;
1142 } 1141 }
@@ -1254,8 +1253,8 @@ EXPORT_SYMBOL(udp_ioctl);
1254 * return it, otherwise we block. 1253 * return it, otherwise we block.
1255 */ 1254 */
1256 1255
1257int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 1256int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
1258 size_t len, int noblock, int flags, int *addr_len) 1257 int flags, int *addr_len)
1259{ 1258{
1260 struct inet_sock *inet = inet_sk(sk); 1259 struct inet_sock *inet = inet_sk(sk);
1261 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); 1260 DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name);
diff --git a/net/ipv4/udp_impl.h b/net/ipv4/udp_impl.h
index f3c27899f62b..7e0fe4bdd967 100644
--- a/net/ipv4/udp_impl.h
+++ b/net/ipv4/udp_impl.h
@@ -21,8 +21,8 @@ int compat_udp_setsockopt(struct sock *sk, int level, int optname,
21int compat_udp_getsockopt(struct sock *sk, int level, int optname, 21int compat_udp_getsockopt(struct sock *sk, int level, int optname,
22 char __user *optval, int __user *optlen); 22 char __user *optval, int __user *optlen);
23#endif 23#endif
24int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 24int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
25 size_t len, int noblock, int flags, int *addr_len); 25 int flags, int *addr_len);
26int udp_sendpage(struct sock *sk, struct page *page, int offset, size_t size, 26int udp_sendpage(struct sock *sk, struct page *page, int offset, size_t size,
27 int flags); 27 int flags);
28int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); 28int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index bd46f736f61d..fee25c0ed1f5 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -77,8 +77,7 @@ static int dummy_ipv6_chk_addr(struct net *net, const struct in6_addr *addr,
77 return 0; 77 return 0;
78} 78}
79 79
80int ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 80int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
81 size_t len)
82{ 81{
83 struct inet_sock *inet = inet_sk(sk); 82 struct inet_sock *inet = inet_sk(sk);
84 struct ipv6_pinfo *np = inet6_sk(sk); 83 struct ipv6_pinfo *np = inet6_sk(sk);
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 0d84b2c7f24e..a5287b3582a4 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -456,9 +456,8 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb)
456 * we return it, otherwise we block. 456 * we return it, otherwise we block.
457 */ 457 */
458 458
459static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, 459static int rawv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
460 struct msghdr *msg, size_t len, 460 int noblock, int flags, int *addr_len)
461 int noblock, int flags, int *addr_len)
462{ 461{
463 struct ipv6_pinfo *np = inet6_sk(sk); 462 struct ipv6_pinfo *np = inet6_sk(sk);
464 DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name); 463 DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
@@ -730,8 +729,7 @@ static int raw6_getfrag(void *from, char *to, int offset, int len, int odd,
730 return ip_generic_getfrag(rfv->msg, to, offset, len, odd, skb); 729 return ip_generic_getfrag(rfv->msg, to, offset, len, odd, skb);
731} 730}
732 731
733static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, 732static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
734 struct msghdr *msg, size_t len)
735{ 733{
736 struct ipv6_txoptions opt_space; 734 struct ipv6_txoptions opt_space;
737 DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name); 735 DECLARE_SOCKADDR(struct sockaddr_in6 *, sin6, msg->msg_name);
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index d048d46779fc..70568a4548e4 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -391,8 +391,7 @@ EXPORT_SYMBOL_GPL(udp6_lib_lookup);
391 * return it, otherwise we block. 391 * return it, otherwise we block.
392 */ 392 */
393 393
394int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, 394int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
395 struct msghdr *msg, size_t len,
396 int noblock, int flags, int *addr_len) 395 int noblock, int flags, int *addr_len)
397{ 396{
398 struct ipv6_pinfo *np = inet6_sk(sk); 397 struct ipv6_pinfo *np = inet6_sk(sk);
@@ -1101,8 +1100,7 @@ out:
1101 return err; 1100 return err;
1102} 1101}
1103 1102
1104int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, 1103int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
1105 struct msghdr *msg, size_t len)
1106{ 1104{
1107 struct ipv6_txoptions opt_space; 1105 struct ipv6_txoptions opt_space;
1108 struct udp_sock *up = udp_sk(sk); 1106 struct udp_sock *up = udp_sk(sk);
@@ -1164,12 +1162,12 @@ int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk,
1164do_udp_sendmsg: 1162do_udp_sendmsg:
1165 if (__ipv6_only_sock(sk)) 1163 if (__ipv6_only_sock(sk))
1166 return -ENETUNREACH; 1164 return -ENETUNREACH;
1167 return udp_sendmsg(iocb, sk, msg, len); 1165 return udp_sendmsg(sk, msg, len);
1168 } 1166 }
1169 } 1167 }
1170 1168
1171 if (up->pending == AF_INET) 1169 if (up->pending == AF_INET)
1172 return udp_sendmsg(iocb, sk, msg, len); 1170 return udp_sendmsg(sk, msg, len);
1173 1171
1174 /* Rough check on arithmetic overflow, 1172 /* Rough check on arithmetic overflow,
1175 better check is made in ip6_append_data(). 1173 better check is made in ip6_append_data().
diff --git a/net/ipv6/udp_impl.h b/net/ipv6/udp_impl.h
index c779c3c90b9d..0682c031ccdc 100644
--- a/net/ipv6/udp_impl.h
+++ b/net/ipv6/udp_impl.h
@@ -23,10 +23,9 @@ int compat_udpv6_setsockopt(struct sock *sk, int level, int optname,
23int compat_udpv6_getsockopt(struct sock *sk, int level, int optname, 23int compat_udpv6_getsockopt(struct sock *sk, int level, int optname,
24 char __user *optval, int __user *optlen); 24 char __user *optval, int __user *optlen);
25#endif 25#endif
26int udpv6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 26int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len);
27 size_t len); 27int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
28int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 28 int flags, int *addr_len);
29 size_t len, int noblock, int flags, int *addr_len);
30int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb); 29int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
31void udpv6_destroy_sock(struct sock *sk); 30void udpv6_destroy_sock(struct sock *sk);
32 31
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index f11ad1d95e0e..4ea5d7497b5f 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -1688,8 +1688,7 @@ out:
1688 return rc; 1688 return rc;
1689} 1689}
1690 1690
1691static int ipx_sendmsg(struct kiocb *iocb, struct socket *sock, 1691static int ipx_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1692 struct msghdr *msg, size_t len)
1693{ 1692{
1694 struct sock *sk = sock->sk; 1693 struct sock *sk = sock->sk;
1695 struct ipx_sock *ipxs = ipx_sk(sk); 1694 struct ipx_sock *ipxs = ipx_sk(sk);
@@ -1754,8 +1753,8 @@ out:
1754} 1753}
1755 1754
1756 1755
1757static int ipx_recvmsg(struct kiocb *iocb, struct socket *sock, 1756static int ipx_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1758 struct msghdr *msg, size_t size, int flags) 1757 int flags)
1759{ 1758{
1760 struct sock *sk = sock->sk; 1759 struct sock *sk = sock->sk;
1761 struct ipx_sock *ipxs = ipx_sk(sk); 1760 struct ipx_sock *ipxs = ipx_sk(sk);
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 568edc72d737..ee0ea25c8e7a 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -1256,14 +1256,13 @@ static int irda_release(struct socket *sock)
1256} 1256}
1257 1257
1258/* 1258/*
1259 * Function irda_sendmsg (iocb, sock, msg, len) 1259 * Function irda_sendmsg (sock, msg, len)
1260 * 1260 *
1261 * Send message down to TinyTP. This function is used for both STREAM and 1261 * Send message down to TinyTP. This function is used for both STREAM and
1262 * SEQPACK services. This is possible since it forces the client to 1262 * SEQPACK services. This is possible since it forces the client to
1263 * fragment the message if necessary 1263 * fragment the message if necessary
1264 */ 1264 */
1265static int irda_sendmsg(struct kiocb *iocb, struct socket *sock, 1265static int irda_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1266 struct msghdr *msg, size_t len)
1267{ 1266{
1268 struct sock *sk = sock->sk; 1267 struct sock *sk = sock->sk;
1269 struct irda_sock *self; 1268 struct irda_sock *self;
@@ -1348,13 +1347,13 @@ out:
1348} 1347}
1349 1348
1350/* 1349/*
1351 * Function irda_recvmsg_dgram (iocb, sock, msg, size, flags) 1350 * Function irda_recvmsg_dgram (sock, msg, size, flags)
1352 * 1351 *
1353 * Try to receive message and copy it to user. The frame is discarded 1352 * Try to receive message and copy it to user. The frame is discarded
1354 * after being read, regardless of how much the user actually read 1353 * after being read, regardless of how much the user actually read
1355 */ 1354 */
1356static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, 1355static int irda_recvmsg_dgram(struct socket *sock, struct msghdr *msg,
1357 struct msghdr *msg, size_t size, int flags) 1356 size_t size, int flags)
1358{ 1357{
1359 struct sock *sk = sock->sk; 1358 struct sock *sk = sock->sk;
1360 struct irda_sock *self = irda_sk(sk); 1359 struct irda_sock *self = irda_sk(sk);
@@ -1398,10 +1397,10 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock,
1398} 1397}
1399 1398
1400/* 1399/*
1401 * Function irda_recvmsg_stream (iocb, sock, msg, size, flags) 1400 * Function irda_recvmsg_stream (sock, msg, size, flags)
1402 */ 1401 */
1403static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, 1402static int irda_recvmsg_stream(struct socket *sock, struct msghdr *msg,
1404 struct msghdr *msg, size_t size, int flags) 1403 size_t size, int flags)
1405{ 1404{
1406 struct sock *sk = sock->sk; 1405 struct sock *sk = sock->sk;
1407 struct irda_sock *self = irda_sk(sk); 1406 struct irda_sock *self = irda_sk(sk);
@@ -1515,14 +1514,14 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock,
1515} 1514}
1516 1515
1517/* 1516/*
1518 * Function irda_sendmsg_dgram (iocb, sock, msg, len) 1517 * Function irda_sendmsg_dgram (sock, msg, len)
1519 * 1518 *
1520 * Send message down to TinyTP for the unreliable sequenced 1519 * Send message down to TinyTP for the unreliable sequenced
1521 * packet service... 1520 * packet service...
1522 * 1521 *
1523 */ 1522 */
1524static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, 1523static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg,
1525 struct msghdr *msg, size_t len) 1524 size_t len)
1526{ 1525{
1527 struct sock *sk = sock->sk; 1526 struct sock *sk = sock->sk;
1528 struct irda_sock *self; 1527 struct irda_sock *self;
@@ -1594,14 +1593,14 @@ out:
1594} 1593}
1595 1594
1596/* 1595/*
1597 * Function irda_sendmsg_ultra (iocb, sock, msg, len) 1596 * Function irda_sendmsg_ultra (sock, msg, len)
1598 * 1597 *
1599 * Send message down to IrLMP for the unreliable Ultra 1598 * Send message down to IrLMP for the unreliable Ultra
1600 * packet service... 1599 * packet service...
1601 */ 1600 */
1602#ifdef CONFIG_IRDA_ULTRA 1601#ifdef CONFIG_IRDA_ULTRA
1603static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, 1602static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg,
1604 struct msghdr *msg, size_t len) 1603 size_t len)
1605{ 1604{
1606 struct sock *sk = sock->sk; 1605 struct sock *sk = sock->sk;
1607 struct irda_sock *self; 1606 struct irda_sock *self;
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index 2e9953b2db84..94b4c898a116 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -1026,8 +1026,8 @@ static int iucv_send_iprm(struct iucv_path *path, struct iucv_message *msg,
1026 (void *) prmdata, 8); 1026 (void *) prmdata, 8);
1027} 1027}
1028 1028
1029static int iucv_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 1029static int iucv_sock_sendmsg(struct socket *sock, struct msghdr *msg,
1030 struct msghdr *msg, size_t len) 1030 size_t len)
1031{ 1031{
1032 struct sock *sk = sock->sk; 1032 struct sock *sk = sock->sk;
1033 struct iucv_sock *iucv = iucv_sk(sk); 1033 struct iucv_sock *iucv = iucv_sk(sk);
@@ -1317,8 +1317,8 @@ static void iucv_process_message_q(struct sock *sk)
1317 } 1317 }
1318} 1318}
1319 1319
1320static int iucv_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 1320static int iucv_sock_recvmsg(struct socket *sock, struct msghdr *msg,
1321 struct msghdr *msg, size_t len, int flags) 1321 size_t len, int flags)
1322{ 1322{
1323 int noblock = flags & MSG_DONTWAIT; 1323 int noblock = flags & MSG_DONTWAIT;
1324 struct sock *sk = sock->sk; 1324 struct sock *sk = sock->sk;
diff --git a/net/key/af_key.c b/net/key/af_key.c
index f8ac939d52b4..9255fd9d94bc 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3588,8 +3588,7 @@ static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
3588} 3588}
3589#endif 3589#endif
3590 3590
3591static int pfkey_sendmsg(struct kiocb *kiocb, 3591static int pfkey_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
3592 struct socket *sock, struct msghdr *msg, size_t len)
3593{ 3592{
3594 struct sock *sk = sock->sk; 3593 struct sock *sk = sock->sk;
3595 struct sk_buff *skb = NULL; 3594 struct sk_buff *skb = NULL;
@@ -3630,8 +3629,7 @@ out:
3630 return err ? : len; 3629 return err ? : len;
3631} 3630}
3632 3631
3633static int pfkey_recvmsg(struct kiocb *kiocb, 3632static int pfkey_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
3634 struct socket *sock, struct msghdr *msg, size_t len,
3635 int flags) 3633 int flags)
3636{ 3634{
3637 struct sock *sk = sock->sk; 3635 struct sock *sk = sock->sk;
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index 05dfc8aa36af..79649937ec71 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -385,7 +385,7 @@ drop:
385/* Userspace will call sendmsg() on the tunnel socket to send L2TP 385/* Userspace will call sendmsg() on the tunnel socket to send L2TP
386 * control frames. 386 * control frames.
387 */ 387 */
388static int l2tp_ip_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len) 388static int l2tp_ip_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
389{ 389{
390 struct sk_buff *skb; 390 struct sk_buff *skb;
391 int rc; 391 int rc;
@@ -506,7 +506,7 @@ no_route:
506 goto out; 506 goto out;
507} 507}
508 508
509static int l2tp_ip_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, 509static int l2tp_ip_recvmsg(struct sock *sk, struct msghdr *msg,
510 size_t len, int noblock, int flags, int *addr_len) 510 size_t len, int noblock, int flags, int *addr_len)
511{ 511{
512 struct inet_sock *inet = inet_sk(sk); 512 struct inet_sock *inet = inet_sk(sk);
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c
index 8611f1b63141..d1ded3777815 100644
--- a/net/l2tp/l2tp_ip6.c
+++ b/net/l2tp/l2tp_ip6.c
@@ -480,8 +480,7 @@ out:
480/* Userspace will call sendmsg() on the tunnel socket to send L2TP 480/* Userspace will call sendmsg() on the tunnel socket to send L2TP
481 * control frames. 481 * control frames.
482 */ 482 */
483static int l2tp_ip6_sendmsg(struct kiocb *iocb, struct sock *sk, 483static int l2tp_ip6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
484 struct msghdr *msg, size_t len)
485{ 484{
486 struct ipv6_txoptions opt_space; 485 struct ipv6_txoptions opt_space;
487 DECLARE_SOCKADDR(struct sockaddr_l2tpip6 *, lsa, msg->msg_name); 486 DECLARE_SOCKADDR(struct sockaddr_l2tpip6 *, lsa, msg->msg_name);
@@ -643,9 +642,8 @@ do_confirm:
643 goto done; 642 goto done;
644} 643}
645 644
646static int l2tp_ip6_recvmsg(struct kiocb *iocb, struct sock *sk, 645static int l2tp_ip6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
647 struct msghdr *msg, size_t len, int noblock, 646 int noblock, int flags, int *addr_len)
648 int flags, int *addr_len)
649{ 647{
650 struct ipv6_pinfo *np = inet6_sk(sk); 648 struct ipv6_pinfo *np = inet6_sk(sk);
651 DECLARE_SOCKADDR(struct sockaddr_l2tpip6 *, lsa, msg->msg_name); 649 DECLARE_SOCKADDR(struct sockaddr_l2tpip6 *, lsa, msg->msg_name);
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index cc7a828fc914..e9b0dec56b8e 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -185,9 +185,8 @@ static int pppol2tp_recv_payload_hook(struct sk_buff *skb)
185 185
186/* Receive message. This is the recvmsg for the PPPoL2TP socket. 186/* Receive message. This is the recvmsg for the PPPoL2TP socket.
187 */ 187 */
188static int pppol2tp_recvmsg(struct kiocb *iocb, struct socket *sock, 188static int pppol2tp_recvmsg(struct socket *sock, struct msghdr *msg,
189 struct msghdr *msg, size_t len, 189 size_t len, int flags)
190 int flags)
191{ 190{
192 int err; 191 int err;
193 struct sk_buff *skb; 192 struct sk_buff *skb;
@@ -295,7 +294,7 @@ static void pppol2tp_session_sock_put(struct l2tp_session *session)
295 * when a user application does a sendmsg() on the session socket. L2TP and 294 * when a user application does a sendmsg() on the session socket. L2TP and
296 * PPP headers must be inserted into the user's data. 295 * PPP headers must be inserted into the user's data.
297 */ 296 */
298static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, 297static int pppol2tp_sendmsg(struct socket *sock, struct msghdr *m,
299 size_t total_len) 298 size_t total_len)
300{ 299{
301 static const unsigned char ppph[2] = { 0xff, 0x03 }; 300 static const unsigned char ppph[2] = { 0xff, 0x03 };
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 2c0b83ce43bd..17a8dff06090 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -704,8 +704,8 @@ out:
704 * Copy received data to the socket user. 704 * Copy received data to the socket user.
705 * Returns non-negative upon success, negative otherwise. 705 * Returns non-negative upon success, negative otherwise.
706 */ 706 */
707static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, 707static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
708 struct msghdr *msg, size_t len, int flags) 708 int flags)
709{ 709{
710 DECLARE_SOCKADDR(struct sockaddr_llc *, uaddr, msg->msg_name); 710 DECLARE_SOCKADDR(struct sockaddr_llc *, uaddr, msg->msg_name);
711 const int nonblock = flags & MSG_DONTWAIT; 711 const int nonblock = flags & MSG_DONTWAIT;
@@ -878,8 +878,7 @@ copy_uaddr:
878 * Transmit data provided by the socket user. 878 * Transmit data provided by the socket user.
879 * Returns non-negative upon success, negative otherwise. 879 * Returns non-negative upon success, negative otherwise.
880 */ 880 */
881static int llc_ui_sendmsg(struct kiocb *iocb, struct socket *sock, 881static int llc_ui_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
882 struct msghdr *msg, size_t len)
883{ 882{
884 struct sock *sk = sock->sk; 883 struct sock *sk = sock->sk;
885 struct llc_sock *llc = llc_sk(sk); 884 struct llc_sock *llc = llc_sk(sk);
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 2702673f0f23..a96025c0583f 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2256,8 +2256,7 @@ static void netlink_cmsg_recv_pktinfo(struct msghdr *msg, struct sk_buff *skb)
2256 put_cmsg(msg, SOL_NETLINK, NETLINK_PKTINFO, sizeof(info), &info); 2256 put_cmsg(msg, SOL_NETLINK, NETLINK_PKTINFO, sizeof(info), &info);
2257} 2257}
2258 2258
2259static int netlink_sendmsg(struct kiocb *kiocb, struct socket *sock, 2259static int netlink_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
2260 struct msghdr *msg, size_t len)
2261{ 2260{
2262 struct sock *sk = sock->sk; 2261 struct sock *sk = sock->sk;
2263 struct netlink_sock *nlk = nlk_sk(sk); 2262 struct netlink_sock *nlk = nlk_sk(sk);
@@ -2346,8 +2345,7 @@ out:
2346 return err; 2345 return err;
2347} 2346}
2348 2347
2349static int netlink_recvmsg(struct kiocb *kiocb, struct socket *sock, 2348static int netlink_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
2350 struct msghdr *msg, size_t len,
2351 int flags) 2349 int flags)
2352{ 2350{
2353 struct scm_cookie scm; 2351 struct scm_cookie scm;
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 69f1d5e9959f..b987fd56c3c5 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -1023,8 +1023,7 @@ int nr_rx_frame(struct sk_buff *skb, struct net_device *dev)
1023 return 1; 1023 return 1;
1024} 1024}
1025 1025
1026static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, 1026static int nr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1027 struct msghdr *msg, size_t len)
1028{ 1027{
1029 struct sock *sk = sock->sk; 1028 struct sock *sk = sock->sk;
1030 struct nr_sock *nr = nr_sk(sk); 1029 struct nr_sock *nr = nr_sk(sk);
@@ -1133,8 +1132,8 @@ out:
1133 return err; 1132 return err;
1134} 1133}
1135 1134
1136static int nr_recvmsg(struct kiocb *iocb, struct socket *sock, 1135static int nr_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1137 struct msghdr *msg, size_t size, int flags) 1136 int flags)
1138{ 1137{
1139 struct sock *sk = sock->sk; 1138 struct sock *sk = sock->sk;
1140 DECLARE_SOCKADDR(struct sockaddr_ax25 *, sax, msg->msg_name); 1139 DECLARE_SOCKADDR(struct sockaddr_ax25 *, sax, msg->msg_name);
diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
index e181e290427c..9578bd6a4f3e 100644
--- a/net/nfc/llcp_sock.c
+++ b/net/nfc/llcp_sock.c
@@ -750,8 +750,8 @@ error:
750 return ret; 750 return ret;
751} 751}
752 752
753static int llcp_sock_sendmsg(struct kiocb *iocb, struct socket *sock, 753static int llcp_sock_sendmsg(struct socket *sock, struct msghdr *msg,
754 struct msghdr *msg, size_t len) 754 size_t len)
755{ 755{
756 struct sock *sk = sock->sk; 756 struct sock *sk = sock->sk;
757 struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); 757 struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk);
@@ -793,8 +793,8 @@ static int llcp_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
793 return nfc_llcp_send_i_frame(llcp_sock, msg, len); 793 return nfc_llcp_send_i_frame(llcp_sock, msg, len);
794} 794}
795 795
796static int llcp_sock_recvmsg(struct kiocb *iocb, struct socket *sock, 796static int llcp_sock_recvmsg(struct socket *sock, struct msghdr *msg,
797 struct msghdr *msg, size_t len, int flags) 797 size_t len, int flags)
798{ 798{
799 int noblock = flags & MSG_DONTWAIT; 799 int noblock = flags & MSG_DONTWAIT;
800 struct sock *sk = sock->sk; 800 struct sock *sk = sock->sk;
diff --git a/net/nfc/rawsock.c b/net/nfc/rawsock.c
index 373e138c0ab6..82b4e8024778 100644
--- a/net/nfc/rawsock.c
+++ b/net/nfc/rawsock.c
@@ -211,8 +211,7 @@ static void rawsock_tx_work(struct work_struct *work)
211 } 211 }
212} 212}
213 213
214static int rawsock_sendmsg(struct kiocb *iocb, struct socket *sock, 214static int rawsock_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
215 struct msghdr *msg, size_t len)
216{ 215{
217 struct sock *sk = sock->sk; 216 struct sock *sk = sock->sk;
218 struct nfc_dev *dev = nfc_rawsock(sk)->dev; 217 struct nfc_dev *dev = nfc_rawsock(sk)->dev;
@@ -248,8 +247,8 @@ static int rawsock_sendmsg(struct kiocb *iocb, struct socket *sock,
248 return len; 247 return len;
249} 248}
250 249
251static int rawsock_recvmsg(struct kiocb *iocb, struct socket *sock, 250static int rawsock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
252 struct msghdr *msg, size_t len, int flags) 251 int flags)
253{ 252{
254 int noblock = flags & MSG_DONTWAIT; 253 int noblock = flags & MSG_DONTWAIT;
255 struct sock *sk = sock->sk; 254 struct sock *sk = sock->sk;
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 9db83693d736..404c9735aee9 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1606,8 +1606,8 @@ oom:
1606 * protocol layers and you must therefore supply it with a complete frame 1606 * protocol layers and you must therefore supply it with a complete frame
1607 */ 1607 */
1608 1608
1609static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock, 1609static int packet_sendmsg_spkt(struct socket *sock, struct msghdr *msg,
1610 struct msghdr *msg, size_t len) 1610 size_t len)
1611{ 1611{
1612 struct sock *sk = sock->sk; 1612 struct sock *sk = sock->sk;
1613 DECLARE_SOCKADDR(struct sockaddr_pkt *, saddr, msg->msg_name); 1613 DECLARE_SOCKADDR(struct sockaddr_pkt *, saddr, msg->msg_name);
@@ -2601,8 +2601,7 @@ out:
2601 return err; 2601 return err;
2602} 2602}
2603 2603
2604static int packet_sendmsg(struct kiocb *iocb, struct socket *sock, 2604static int packet_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
2605 struct msghdr *msg, size_t len)
2606{ 2605{
2607 struct sock *sk = sock->sk; 2606 struct sock *sk = sock->sk;
2608 struct packet_sock *po = pkt_sk(sk); 2607 struct packet_sock *po = pkt_sk(sk);
@@ -2882,8 +2881,8 @@ out:
2882 * If necessary we block. 2881 * If necessary we block.
2883 */ 2882 */
2884 2883
2885static int packet_recvmsg(struct kiocb *iocb, struct socket *sock, 2884static int packet_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
2886 struct msghdr *msg, size_t len, int flags) 2885 int flags)
2887{ 2886{
2888 struct sock *sk = sock->sk; 2887 struct sock *sk = sock->sk;
2889 struct sk_buff *skb; 2888 struct sk_buff *skb;
diff --git a/net/phonet/datagram.c b/net/phonet/datagram.c
index 26054b4b467c..5e710435ffa9 100644
--- a/net/phonet/datagram.c
+++ b/net/phonet/datagram.c
@@ -83,8 +83,7 @@ static int pn_init(struct sock *sk)
83 return 0; 83 return 0;
84} 84}
85 85
86static int pn_sendmsg(struct kiocb *iocb, struct sock *sk, 86static int pn_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
87 struct msghdr *msg, size_t len)
88{ 87{
89 DECLARE_SOCKADDR(struct sockaddr_pn *, target, msg->msg_name); 88 DECLARE_SOCKADDR(struct sockaddr_pn *, target, msg->msg_name);
90 struct sk_buff *skb; 89 struct sk_buff *skb;
@@ -125,9 +124,8 @@ static int pn_sendmsg(struct kiocb *iocb, struct sock *sk,
125 return (err >= 0) ? len : err; 124 return (err >= 0) ? len : err;
126} 125}
127 126
128static int pn_recvmsg(struct kiocb *iocb, struct sock *sk, 127static int pn_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
129 struct msghdr *msg, size_t len, int noblock, 128 int noblock, int flags, int *addr_len)
130 int flags, int *addr_len)
131{ 129{
132 struct sk_buff *skb = NULL; 130 struct sk_buff *skb = NULL;
133 struct sockaddr_pn sa; 131 struct sockaddr_pn sa;
diff --git a/net/phonet/pep.c b/net/phonet/pep.c
index 5d3f2b7507d4..6de2aeb98a1f 100644
--- a/net/phonet/pep.c
+++ b/net/phonet/pep.c
@@ -1118,8 +1118,7 @@ static int pipe_skb_send(struct sock *sk, struct sk_buff *skb)
1118 1118
1119} 1119}
1120 1120
1121static int pep_sendmsg(struct kiocb *iocb, struct sock *sk, 1121static int pep_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
1122 struct msghdr *msg, size_t len)
1123{ 1122{
1124 struct pep_sock *pn = pep_sk(sk); 1123 struct pep_sock *pn = pep_sk(sk);
1125 struct sk_buff *skb; 1124 struct sk_buff *skb;
@@ -1246,9 +1245,8 @@ struct sk_buff *pep_read(struct sock *sk)
1246 return skb; 1245 return skb;
1247} 1246}
1248 1247
1249static int pep_recvmsg(struct kiocb *iocb, struct sock *sk, 1248static int pep_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
1250 struct msghdr *msg, size_t len, int noblock, 1249 int noblock, int flags, int *addr_len)
1251 int flags, int *addr_len)
1252{ 1250{
1253 struct sk_buff *skb; 1251 struct sk_buff *skb;
1254 int err; 1252 int err;
diff --git a/net/phonet/socket.c b/net/phonet/socket.c
index 008214a3d5eb..d575ef4e9aa6 100644
--- a/net/phonet/socket.c
+++ b/net/phonet/socket.c
@@ -425,15 +425,15 @@ out:
425 return err; 425 return err;
426} 426}
427 427
428static int pn_socket_sendmsg(struct kiocb *iocb, struct socket *sock, 428static int pn_socket_sendmsg(struct socket *sock, struct msghdr *m,
429 struct msghdr *m, size_t total_len) 429 size_t total_len)
430{ 430{
431 struct sock *sk = sock->sk; 431 struct sock *sk = sock->sk;
432 432
433 if (pn_socket_autobind(sock)) 433 if (pn_socket_autobind(sock))
434 return -EAGAIN; 434 return -EAGAIN;
435 435
436 return sk->sk_prot->sendmsg(iocb, sk, m, total_len); 436 return sk->sk_prot->sendmsg(sk, m, total_len);
437} 437}
438 438
439const struct proto_ops phonet_dgram_ops = { 439const struct proto_ops phonet_dgram_ops = {
diff --git a/net/rds/rds.h b/net/rds/rds.h
index c2a5eef41343..c3f2855c3d84 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -702,8 +702,8 @@ void rds_inc_init(struct rds_incoming *inc, struct rds_connection *conn,
702void rds_inc_put(struct rds_incoming *inc); 702void rds_inc_put(struct rds_incoming *inc);
703void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr, 703void rds_recv_incoming(struct rds_connection *conn, __be32 saddr, __be32 daddr,
704 struct rds_incoming *inc, gfp_t gfp); 704 struct rds_incoming *inc, gfp_t gfp);
705int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 705int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
706 size_t size, int msg_flags); 706 int msg_flags);
707void rds_clear_recv_queue(struct rds_sock *rs); 707void rds_clear_recv_queue(struct rds_sock *rs);
708int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msg); 708int rds_notify_queue_get(struct rds_sock *rs, struct msghdr *msg);
709void rds_inc_info_copy(struct rds_incoming *inc, 709void rds_inc_info_copy(struct rds_incoming *inc,
@@ -711,8 +711,7 @@ void rds_inc_info_copy(struct rds_incoming *inc,
711 __be32 saddr, __be32 daddr, int flip); 711 __be32 saddr, __be32 daddr, int flip);
712 712
713/* send.c */ 713/* send.c */
714int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 714int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len);
715 size_t payload_len);
716void rds_send_reset(struct rds_connection *conn); 715void rds_send_reset(struct rds_connection *conn);
717int rds_send_xmit(struct rds_connection *conn); 716int rds_send_xmit(struct rds_connection *conn);
718struct sockaddr_in; 717struct sockaddr_in;
diff --git a/net/rds/recv.c b/net/rds/recv.c
index f9ec1acd801c..a00462b0d01d 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -395,8 +395,8 @@ static int rds_cmsg_recv(struct rds_incoming *inc, struct msghdr *msg)
395 return 0; 395 return 0;
396} 396}
397 397
398int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 398int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
399 size_t size, int msg_flags) 399 int msg_flags)
400{ 400{
401 struct sock *sk = sock->sk; 401 struct sock *sk = sock->sk;
402 struct rds_sock *rs = rds_sk_to_rs(sk); 402 struct rds_sock *rs = rds_sk_to_rs(sk);
diff --git a/net/rds/send.c b/net/rds/send.c
index 42f65d4305c8..44672befc0ee 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -920,8 +920,7 @@ static int rds_cmsg_send(struct rds_sock *rs, struct rds_message *rm,
920 return ret; 920 return ret;
921} 921}
922 922
923int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, 923int rds_sendmsg(struct socket *sock, struct msghdr *msg, size_t payload_len)
924 size_t payload_len)
925{ 924{
926 struct sock *sk = sock->sk; 925 struct sock *sk = sock->sk;
927 struct rds_sock *rs = rds_sk_to_rs(sk); 926 struct rds_sock *rs = rds_sk_to_rs(sk);
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 43bac7c4dd9e..8ae603069a1a 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -1046,8 +1046,7 @@ int rose_rx_call_request(struct sk_buff *skb, struct net_device *dev, struct ros
1046 return 1; 1046 return 1;
1047} 1047}
1048 1048
1049static int rose_sendmsg(struct kiocb *iocb, struct socket *sock, 1049static int rose_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1050 struct msghdr *msg, size_t len)
1051{ 1050{
1052 struct sock *sk = sock->sk; 1051 struct sock *sk = sock->sk;
1053 struct rose_sock *rose = rose_sk(sk); 1052 struct rose_sock *rose = rose_sk(sk);
@@ -1211,8 +1210,8 @@ static int rose_sendmsg(struct kiocb *iocb, struct socket *sock,
1211} 1210}
1212 1211
1213 1212
1214static int rose_recvmsg(struct kiocb *iocb, struct socket *sock, 1213static int rose_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1215 struct msghdr *msg, size_t size, int flags) 1214 int flags)
1216{ 1215{
1217 struct sock *sk = sock->sk; 1216 struct sock *sk = sock->sk;
1218 struct rose_sock *rose = rose_sk(sk); 1217 struct rose_sock *rose = rose_sk(sk);
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c
index 7b1670489638..0095b9a0b779 100644
--- a/net/rxrpc/af_rxrpc.c
+++ b/net/rxrpc/af_rxrpc.c
@@ -441,8 +441,7 @@ static int rxrpc_connect(struct socket *sock, struct sockaddr *addr,
441 * - sends a call data packet 441 * - sends a call data packet
442 * - may send an abort (abort code in control data) 442 * - may send an abort (abort code in control data)
443 */ 443 */
444static int rxrpc_sendmsg(struct kiocb *iocb, struct socket *sock, 444static int rxrpc_sendmsg(struct socket *sock, struct msghdr *m, size_t len)
445 struct msghdr *m, size_t len)
446{ 445{
447 struct rxrpc_transport *trans; 446 struct rxrpc_transport *trans;
448 struct rxrpc_sock *rx = rxrpc_sk(sock->sk); 447 struct rxrpc_sock *rx = rxrpc_sk(sock->sk);
@@ -482,7 +481,7 @@ static int rxrpc_sendmsg(struct kiocb *iocb, struct socket *sock,
482 switch (rx->sk.sk_state) { 481 switch (rx->sk.sk_state) {
483 case RXRPC_SERVER_LISTENING: 482 case RXRPC_SERVER_LISTENING:
484 if (!m->msg_name) { 483 if (!m->msg_name) {
485 ret = rxrpc_server_sendmsg(iocb, rx, m, len); 484 ret = rxrpc_server_sendmsg(rx, m, len);
486 break; 485 break;
487 } 486 }
488 case RXRPC_SERVER_BOUND: 487 case RXRPC_SERVER_BOUND:
@@ -492,7 +491,7 @@ static int rxrpc_sendmsg(struct kiocb *iocb, struct socket *sock,
492 break; 491 break;
493 } 492 }
494 case RXRPC_CLIENT_CONNECTED: 493 case RXRPC_CLIENT_CONNECTED:
495 ret = rxrpc_client_sendmsg(iocb, rx, trans, m, len); 494 ret = rxrpc_client_sendmsg(rx, trans, m, len);
496 break; 495 break;
497 default: 496 default:
498 ret = -ENOTCONN; 497 ret = -ENOTCONN;
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index ba9fd36d3f15..2fc1e659e5c9 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -548,10 +548,9 @@ int rxrpc_get_server_data_key(struct rxrpc_connection *, const void *, time_t,
548extern unsigned rxrpc_resend_timeout; 548extern unsigned rxrpc_resend_timeout;
549 549
550int rxrpc_send_packet(struct rxrpc_transport *, struct sk_buff *); 550int rxrpc_send_packet(struct rxrpc_transport *, struct sk_buff *);
551int rxrpc_client_sendmsg(struct kiocb *, struct rxrpc_sock *, 551int rxrpc_client_sendmsg(struct rxrpc_sock *, struct rxrpc_transport *,
552 struct rxrpc_transport *, struct msghdr *, size_t); 552 struct msghdr *, size_t);
553int rxrpc_server_sendmsg(struct kiocb *, struct rxrpc_sock *, struct msghdr *, 553int rxrpc_server_sendmsg(struct rxrpc_sock *, struct msghdr *, size_t);
554 size_t);
555 554
556/* 555/*
557 * ar-peer.c 556 * ar-peer.c
@@ -572,8 +571,7 @@ extern const struct file_operations rxrpc_connection_seq_fops;
572 * ar-recvmsg.c 571 * ar-recvmsg.c
573 */ 572 */
574void rxrpc_remove_user_ID(struct rxrpc_sock *, struct rxrpc_call *); 573void rxrpc_remove_user_ID(struct rxrpc_sock *, struct rxrpc_call *);
575int rxrpc_recvmsg(struct kiocb *, struct socket *, struct msghdr *, size_t, 574int rxrpc_recvmsg(struct socket *, struct msghdr *, size_t, int);
576 int);
577 575
578/* 576/*
579 * ar-security.c 577 * ar-security.c
diff --git a/net/rxrpc/ar-output.c b/net/rxrpc/ar-output.c
index 8331c95e1522..09f584566e23 100644
--- a/net/rxrpc/ar-output.c
+++ b/net/rxrpc/ar-output.c
@@ -23,8 +23,7 @@
23 */ 23 */
24unsigned rxrpc_resend_timeout = 4 * HZ; 24unsigned rxrpc_resend_timeout = 4 * HZ;
25 25
26static int rxrpc_send_data(struct kiocb *iocb, 26static int rxrpc_send_data(struct rxrpc_sock *rx,
27 struct rxrpc_sock *rx,
28 struct rxrpc_call *call, 27 struct rxrpc_call *call,
29 struct msghdr *msg, size_t len); 28 struct msghdr *msg, size_t len);
30 29
@@ -129,9 +128,8 @@ static void rxrpc_send_abort(struct rxrpc_call *call, u32 abort_code)
129 * - caller holds the socket locked 128 * - caller holds the socket locked
130 * - the socket may be either a client socket or a server socket 129 * - the socket may be either a client socket or a server socket
131 */ 130 */
132int rxrpc_client_sendmsg(struct kiocb *iocb, struct rxrpc_sock *rx, 131int rxrpc_client_sendmsg(struct rxrpc_sock *rx, struct rxrpc_transport *trans,
133 struct rxrpc_transport *trans, struct msghdr *msg, 132 struct msghdr *msg, size_t len)
134 size_t len)
135{ 133{
136 struct rxrpc_conn_bundle *bundle; 134 struct rxrpc_conn_bundle *bundle;
137 enum rxrpc_command cmd; 135 enum rxrpc_command cmd;
@@ -191,7 +189,7 @@ int rxrpc_client_sendmsg(struct kiocb *iocb, struct rxrpc_sock *rx,
191 /* request phase complete for this client call */ 189 /* request phase complete for this client call */
192 ret = -EPROTO; 190 ret = -EPROTO;
193 } else { 191 } else {
194 ret = rxrpc_send_data(iocb, rx, call, msg, len); 192 ret = rxrpc_send_data(rx, call, msg, len);
195 } 193 }
196 194
197 rxrpc_put_call(call); 195 rxrpc_put_call(call);
@@ -232,7 +230,7 @@ int rxrpc_kernel_send_data(struct rxrpc_call *call, struct msghdr *msg,
232 call->state != RXRPC_CALL_SERVER_SEND_REPLY) { 230 call->state != RXRPC_CALL_SERVER_SEND_REPLY) {
233 ret = -EPROTO; /* request phase complete for this client call */ 231 ret = -EPROTO; /* request phase complete for this client call */
234 } else { 232 } else {
235 ret = rxrpc_send_data(NULL, call->socket, call, msg, len); 233 ret = rxrpc_send_data(call->socket, call, msg, len);
236 } 234 }
237 235
238 release_sock(&call->socket->sk); 236 release_sock(&call->socket->sk);
@@ -271,8 +269,7 @@ EXPORT_SYMBOL(rxrpc_kernel_abort_call);
271 * send a message through a server socket 269 * send a message through a server socket
272 * - caller holds the socket locked 270 * - caller holds the socket locked
273 */ 271 */
274int rxrpc_server_sendmsg(struct kiocb *iocb, struct rxrpc_sock *rx, 272int rxrpc_server_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
275 struct msghdr *msg, size_t len)
276{ 273{
277 enum rxrpc_command cmd; 274 enum rxrpc_command cmd;
278 struct rxrpc_call *call; 275 struct rxrpc_call *call;
@@ -313,7 +310,7 @@ int rxrpc_server_sendmsg(struct kiocb *iocb, struct rxrpc_sock *rx,
313 break; 310 break;
314 } 311 }
315 312
316 ret = rxrpc_send_data(iocb, rx, call, msg, len); 313 ret = rxrpc_send_data(rx, call, msg, len);
317 break; 314 break;
318 315
319 case RXRPC_CMD_SEND_ABORT: 316 case RXRPC_CMD_SEND_ABORT:
@@ -520,8 +517,7 @@ static void rxrpc_queue_packet(struct rxrpc_call *call, struct sk_buff *skb,
520 * - must be called in process context 517 * - must be called in process context
521 * - caller holds the socket locked 518 * - caller holds the socket locked
522 */ 519 */
523static int rxrpc_send_data(struct kiocb *iocb, 520static int rxrpc_send_data(struct rxrpc_sock *rx,
524 struct rxrpc_sock *rx,
525 struct rxrpc_call *call, 521 struct rxrpc_call *call,
526 struct msghdr *msg, size_t len) 522 struct msghdr *msg, size_t len)
527{ 523{
diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c
index d58ba702bd2c..a4f883e2d66f 100644
--- a/net/rxrpc/ar-recvmsg.c
+++ b/net/rxrpc/ar-recvmsg.c
@@ -43,8 +43,8 @@ void rxrpc_remove_user_ID(struct rxrpc_sock *rx, struct rxrpc_call *call)
43 * - we need to be careful about two or more threads calling recvmsg 43 * - we need to be careful about two or more threads calling recvmsg
44 * simultaneously 44 * simultaneously
45 */ 45 */
46int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock, 46int rxrpc_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
47 struct msghdr *msg, size_t len, int flags) 47 int flags)
48{ 48{
49 struct rxrpc_skb_priv *sp; 49 struct rxrpc_skb_priv *sp;
50 struct rxrpc_call *call = NULL, *continue_call = NULL; 50 struct rxrpc_call *call = NULL, *continue_call = NULL;
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index aafe94bf292e..f1a65398f311 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1586,8 +1586,7 @@ static int sctp_error(struct sock *sk, int flags, int err)
1586 1586
1587static int sctp_msghdr_parse(const struct msghdr *, sctp_cmsgs_t *); 1587static int sctp_msghdr_parse(const struct msghdr *, sctp_cmsgs_t *);
1588 1588
1589static int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, 1589static int sctp_sendmsg(struct sock *sk, struct msghdr *msg, size_t msg_len)
1590 struct msghdr *msg, size_t msg_len)
1591{ 1590{
1592 struct net *net = sock_net(sk); 1591 struct net *net = sock_net(sk);
1593 struct sctp_sock *sp; 1592 struct sctp_sock *sp;
@@ -2066,9 +2065,8 @@ static int sctp_skb_pull(struct sk_buff *skb, int len)
2066 * flags - flags sent or received with the user message, see Section 2065 * flags - flags sent or received with the user message, see Section
2067 * 5 for complete description of the flags. 2066 * 5 for complete description of the flags.
2068 */ 2067 */
2069static int sctp_recvmsg(struct kiocb *iocb, struct sock *sk, 2068static int sctp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
2070 struct msghdr *msg, size_t len, int noblock, 2069 int noblock, int flags, int *addr_len)
2071 int flags, int *addr_len)
2072{ 2070{
2073 struct sctp_ulpevent *event = NULL; 2071 struct sctp_ulpevent *event = NULL;
2074 struct sctp_sock *sp = sctp_sk(sk); 2072 struct sctp_sock *sp = sctp_sk(sk);
diff --git a/net/socket.c b/net/socket.c
index b78cf601a021..95d3085cb477 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -610,45 +610,20 @@ void __sock_tx_timestamp(const struct sock *sk, __u8 *tx_flags)
610} 610}
611EXPORT_SYMBOL(__sock_tx_timestamp); 611EXPORT_SYMBOL(__sock_tx_timestamp);
612 612
613static inline int __sock_sendmsg_nosec(struct kiocb *iocb, struct socket *sock, 613static inline int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg,
614 struct msghdr *msg, size_t size) 614 size_t size)
615{ 615{
616 return sock->ops->sendmsg(iocb, sock, msg, size); 616 return sock->ops->sendmsg(sock, msg, size);
617} 617}
618 618
619static inline int __sock_sendmsg(struct kiocb *iocb, struct socket *sock, 619int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
620 struct msghdr *msg, size_t size)
621{ 620{
622 int err = security_socket_sendmsg(sock, msg, size); 621 int err = security_socket_sendmsg(sock, msg, size);
623 622
624 return err ?: __sock_sendmsg_nosec(iocb, sock, msg, size); 623 return err ?: sock_sendmsg_nosec(sock, msg, size);
625}
626
627static int do_sock_sendmsg(struct socket *sock, struct msghdr *msg,
628 size_t size, bool nosec)
629{
630 struct kiocb iocb;
631 int ret;
632
633 init_sync_kiocb(&iocb, NULL);
634 ret = nosec ? __sock_sendmsg_nosec(&iocb, sock, msg, size) :
635 __sock_sendmsg(&iocb, sock, msg, size);
636 if (-EIOCBQUEUED == ret)
637 ret = wait_on_sync_kiocb(&iocb);
638 return ret;
639}
640
641int sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
642{
643 return do_sock_sendmsg(sock, msg, size, false);
644} 624}
645EXPORT_SYMBOL(sock_sendmsg); 625EXPORT_SYMBOL(sock_sendmsg);
646 626
647static int sock_sendmsg_nosec(struct socket *sock, struct msghdr *msg, size_t size)
648{
649 return do_sock_sendmsg(sock, msg, size, true);
650}
651
652int kernel_sendmsg(struct socket *sock, struct msghdr *msg, 627int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
653 struct kvec *vec, size_t num, size_t size) 628 struct kvec *vec, size_t num, size_t size)
654{ 629{
@@ -744,47 +719,21 @@ void __sock_recv_ts_and_drops(struct msghdr *msg, struct sock *sk,
744} 719}
745EXPORT_SYMBOL_GPL(__sock_recv_ts_and_drops); 720EXPORT_SYMBOL_GPL(__sock_recv_ts_and_drops);
746 721
747static inline int __sock_recvmsg_nosec(struct kiocb *iocb, struct socket *sock, 722static inline int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
748 struct msghdr *msg, size_t size, int flags) 723 size_t size, int flags)
749{ 724{
750 return sock->ops->recvmsg(iocb, sock, msg, size, flags); 725 return sock->ops->recvmsg(sock, msg, size, flags);
751} 726}
752 727
753static inline int __sock_recvmsg(struct kiocb *iocb, struct socket *sock, 728int sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
754 struct msghdr *msg, size_t size, int flags) 729 int flags)
755{ 730{
756 int err = security_socket_recvmsg(sock, msg, size, flags); 731 int err = security_socket_recvmsg(sock, msg, size, flags);
757 732
758 return err ?: __sock_recvmsg_nosec(iocb, sock, msg, size, flags); 733 return err ?: sock_recvmsg_nosec(sock, msg, size, flags);
759}
760
761int sock_recvmsg(struct socket *sock, struct msghdr *msg,
762 size_t size, int flags)
763{
764 struct kiocb iocb;
765 int ret;
766
767 init_sync_kiocb(&iocb, NULL);
768 ret = __sock_recvmsg(&iocb, sock, msg, size, flags);
769 if (-EIOCBQUEUED == ret)
770 ret = wait_on_sync_kiocb(&iocb);
771 return ret;
772} 734}
773EXPORT_SYMBOL(sock_recvmsg); 735EXPORT_SYMBOL(sock_recvmsg);
774 736
775static int sock_recvmsg_nosec(struct socket *sock, struct msghdr *msg,
776 size_t size, int flags)
777{
778 struct kiocb iocb;
779 int ret;
780
781 init_sync_kiocb(&iocb, NULL);
782 ret = __sock_recvmsg_nosec(&iocb, sock, msg, size, flags);
783 if (-EIOCBQUEUED == ret)
784 ret = wait_on_sync_kiocb(&iocb);
785 return ret;
786}
787
788/** 737/**
789 * kernel_recvmsg - Receive a message from a socket (kernel space) 738 * kernel_recvmsg - Receive a message from a socket (kernel space)
790 * @sock: The socket to receive the message from 739 * @sock: The socket to receive the message from
@@ -861,8 +810,7 @@ static ssize_t sock_read_iter(struct kiocb *iocb, struct iov_iter *to)
861 if (iocb->ki_nbytes == 0) /* Match SYS5 behaviour */ 810 if (iocb->ki_nbytes == 0) /* Match SYS5 behaviour */
862 return 0; 811 return 0;
863 812
864 res = __sock_recvmsg(iocb, sock, &msg, 813 res = sock_recvmsg(sock, &msg, iocb->ki_nbytes, msg.msg_flags);
865 iocb->ki_nbytes, msg.msg_flags);
866 *to = msg.msg_iter; 814 *to = msg.msg_iter;
867 return res; 815 return res;
868} 816}
@@ -883,7 +831,7 @@ static ssize_t sock_write_iter(struct kiocb *iocb, struct iov_iter *from)
883 if (sock->type == SOCK_SEQPACKET) 831 if (sock->type == SOCK_SEQPACKET)
884 msg.msg_flags |= MSG_EOR; 832 msg.msg_flags |= MSG_EOR;
885 833
886 res = __sock_sendmsg(iocb, sock, &msg, iocb->ki_nbytes); 834 res = sock_sendmsg(sock, &msg, iocb->ki_nbytes);
887 *from = msg.msg_iter; 835 *from = msg.msg_iter;
888 return res; 836 return res;
889} 837}
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index c245ec31fa4c..dcb797c60806 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -895,7 +895,6 @@ static int tipc_wait_for_sndmsg(struct socket *sock, long *timeo_p)
895 895
896/** 896/**
897 * tipc_sendmsg - send message in connectionless manner 897 * tipc_sendmsg - send message in connectionless manner
898 * @iocb: if NULL, indicates that socket lock is already held
899 * @sock: socket structure 898 * @sock: socket structure
900 * @m: message to send 899 * @m: message to send
901 * @dsz: amount of user data to be sent 900 * @dsz: amount of user data to be sent
@@ -907,7 +906,7 @@ static int tipc_wait_for_sndmsg(struct socket *sock, long *timeo_p)
907 * 906 *
908 * Returns the number of bytes sent on success, or errno otherwise 907 * Returns the number of bytes sent on success, or errno otherwise
909 */ 908 */
910static int tipc_sendmsg(struct kiocb *iocb, struct socket *sock, 909static int tipc_sendmsg(struct socket *sock,
911 struct msghdr *m, size_t dsz) 910 struct msghdr *m, size_t dsz)
912{ 911{
913 struct sock *sk = sock->sk; 912 struct sock *sk = sock->sk;
@@ -1052,7 +1051,6 @@ static int tipc_wait_for_sndpkt(struct socket *sock, long *timeo_p)
1052 1051
1053/** 1052/**
1054 * tipc_send_stream - send stream-oriented data 1053 * tipc_send_stream - send stream-oriented data
1055 * @iocb: (unused)
1056 * @sock: socket structure 1054 * @sock: socket structure
1057 * @m: data to send 1055 * @m: data to send
1058 * @dsz: total length of data to be transmitted 1056 * @dsz: total length of data to be transmitted
@@ -1062,8 +1060,7 @@ static int tipc_wait_for_sndpkt(struct socket *sock, long *timeo_p)
1062 * Returns the number of bytes sent on success (or partial success), 1060 * Returns the number of bytes sent on success (or partial success),
1063 * or errno if no data sent 1061 * or errno if no data sent
1064 */ 1062 */
1065static int tipc_send_stream(struct kiocb *iocb, struct socket *sock, 1063static int tipc_send_stream(struct socket *sock, struct msghdr *m, size_t dsz)
1066 struct msghdr *m, size_t dsz)
1067{ 1064{
1068 struct sock *sk = sock->sk; 1065 struct sock *sk = sock->sk;
1069 int ret; 1066 int ret;
@@ -1147,7 +1144,6 @@ next:
1147 1144
1148/** 1145/**
1149 * tipc_send_packet - send a connection-oriented message 1146 * tipc_send_packet - send a connection-oriented message
1150 * @iocb: if NULL, indicates that socket lock is already held
1151 * @sock: socket structure 1147 * @sock: socket structure
1152 * @m: message to send 1148 * @m: message to send
1153 * @dsz: length of data to be transmitted 1149 * @dsz: length of data to be transmitted
@@ -1156,13 +1152,12 @@ next:
1156 * 1152 *
1157 * Returns the number of bytes sent on success, or errno otherwise 1153 * Returns the number of bytes sent on success, or errno otherwise
1158 */ 1154 */
1159static int tipc_send_packet(struct kiocb *iocb, struct socket *sock, 1155static int tipc_send_packet(struct socket *sock, struct msghdr *m, size_t dsz)
1160 struct msghdr *m, size_t dsz)
1161{ 1156{
1162 if (dsz > TIPC_MAX_USER_MSG_SIZE) 1157 if (dsz > TIPC_MAX_USER_MSG_SIZE)
1163 return -EMSGSIZE; 1158 return -EMSGSIZE;
1164 1159
1165 return tipc_send_stream(iocb, sock, m, dsz); 1160 return tipc_send_stream(sock, m, dsz);
1166} 1161}
1167 1162
1168/* tipc_sk_finish_conn - complete the setup of a connection 1163/* tipc_sk_finish_conn - complete the setup of a connection
@@ -1337,7 +1332,6 @@ static int tipc_wait_for_rcvmsg(struct socket *sock, long *timeop)
1337 1332
1338/** 1333/**
1339 * tipc_recvmsg - receive packet-oriented message 1334 * tipc_recvmsg - receive packet-oriented message
1340 * @iocb: (unused)
1341 * @m: descriptor for message info 1335 * @m: descriptor for message info
1342 * @buf_len: total size of user buffer area 1336 * @buf_len: total size of user buffer area
1343 * @flags: receive flags 1337 * @flags: receive flags
@@ -1347,8 +1341,8 @@ static int tipc_wait_for_rcvmsg(struct socket *sock, long *timeop)
1347 * 1341 *
1348 * Returns size of returned message data, errno otherwise 1342 * Returns size of returned message data, errno otherwise
1349 */ 1343 */
1350static int tipc_recvmsg(struct kiocb *iocb, struct socket *sock, 1344static int tipc_recvmsg(struct socket *sock, struct msghdr *m, size_t buf_len,
1351 struct msghdr *m, size_t buf_len, int flags) 1345 int flags)
1352{ 1346{
1353 struct sock *sk = sock->sk; 1347 struct sock *sk = sock->sk;
1354 struct tipc_sock *tsk = tipc_sk(sk); 1348 struct tipc_sock *tsk = tipc_sk(sk);
@@ -1432,7 +1426,6 @@ exit:
1432 1426
1433/** 1427/**
1434 * tipc_recv_stream - receive stream-oriented data 1428 * tipc_recv_stream - receive stream-oriented data
1435 * @iocb: (unused)
1436 * @m: descriptor for message info 1429 * @m: descriptor for message info
1437 * @buf_len: total size of user buffer area 1430 * @buf_len: total size of user buffer area
1438 * @flags: receive flags 1431 * @flags: receive flags
@@ -1442,8 +1435,8 @@ exit:
1442 * 1435 *
1443 * Returns size of returned message data, errno otherwise 1436 * Returns size of returned message data, errno otherwise
1444 */ 1437 */
1445static int tipc_recv_stream(struct kiocb *iocb, struct socket *sock, 1438static int tipc_recv_stream(struct socket *sock, struct msghdr *m,
1446 struct msghdr *m, size_t buf_len, int flags) 1439 size_t buf_len, int flags)
1447{ 1440{
1448 struct sock *sk = sock->sk; 1441 struct sock *sk = sock->sk;
1449 struct tipc_sock *tsk = tipc_sk(sk); 1442 struct tipc_sock *tsk = tipc_sk(sk);
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 526b6edab018..433f287ee548 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -516,20 +516,15 @@ static unsigned int unix_dgram_poll(struct file *, struct socket *,
516 poll_table *); 516 poll_table *);
517static int unix_ioctl(struct socket *, unsigned int, unsigned long); 517static int unix_ioctl(struct socket *, unsigned int, unsigned long);
518static int unix_shutdown(struct socket *, int); 518static int unix_shutdown(struct socket *, int);
519static int unix_stream_sendmsg(struct kiocb *, struct socket *, 519static int unix_stream_sendmsg(struct socket *, struct msghdr *, size_t);
520 struct msghdr *, size_t); 520static int unix_stream_recvmsg(struct socket *, struct msghdr *, size_t, int);
521static int unix_stream_recvmsg(struct kiocb *, struct socket *, 521static int unix_dgram_sendmsg(struct socket *, struct msghdr *, size_t);
522 struct msghdr *, size_t, int); 522static int unix_dgram_recvmsg(struct socket *, struct msghdr *, size_t, int);
523static int unix_dgram_sendmsg(struct kiocb *, struct socket *,
524 struct msghdr *, size_t);
525static int unix_dgram_recvmsg(struct kiocb *, struct socket *,
526 struct msghdr *, size_t, int);
527static int unix_dgram_connect(struct socket *, struct sockaddr *, 523static int unix_dgram_connect(struct socket *, struct sockaddr *,
528 int, int); 524 int, int);
529static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *, 525static int unix_seqpacket_sendmsg(struct socket *, struct msghdr *, size_t);
530 struct msghdr *, size_t); 526static int unix_seqpacket_recvmsg(struct socket *, struct msghdr *, size_t,
531static int unix_seqpacket_recvmsg(struct kiocb *, struct socket *, 527 int);
532 struct msghdr *, size_t, int);
533 528
534static int unix_set_peek_off(struct sock *sk, int val) 529static int unix_set_peek_off(struct sock *sk, int val)
535{ 530{
@@ -1442,8 +1437,8 @@ static void maybe_add_creds(struct sk_buff *skb, const struct socket *sock,
1442 * Send AF_UNIX data. 1437 * Send AF_UNIX data.
1443 */ 1438 */
1444 1439
1445static int unix_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, 1440static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
1446 struct msghdr *msg, size_t len) 1441 size_t len)
1447{ 1442{
1448 struct sock *sk = sock->sk; 1443 struct sock *sk = sock->sk;
1449 struct net *net = sock_net(sk); 1444 struct net *net = sock_net(sk);
@@ -1622,8 +1617,8 @@ out:
1622 */ 1617 */
1623#define UNIX_SKB_FRAGS_SZ (PAGE_SIZE << get_order(32768)) 1618#define UNIX_SKB_FRAGS_SZ (PAGE_SIZE << get_order(32768))
1624 1619
1625static int unix_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, 1620static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
1626 struct msghdr *msg, size_t len) 1621 size_t len)
1627{ 1622{
1628 struct sock *sk = sock->sk; 1623 struct sock *sk = sock->sk;
1629 struct sock *other = NULL; 1624 struct sock *other = NULL;
@@ -1725,8 +1720,8 @@ out_err:
1725 return sent ? : err; 1720 return sent ? : err;
1726} 1721}
1727 1722
1728static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock, 1723static int unix_seqpacket_sendmsg(struct socket *sock, struct msghdr *msg,
1729 struct msghdr *msg, size_t len) 1724 size_t len)
1730{ 1725{
1731 int err; 1726 int err;
1732 struct sock *sk = sock->sk; 1727 struct sock *sk = sock->sk;
@@ -1741,19 +1736,18 @@ static int unix_seqpacket_sendmsg(struct kiocb *kiocb, struct socket *sock,
1741 if (msg->msg_namelen) 1736 if (msg->msg_namelen)
1742 msg->msg_namelen = 0; 1737 msg->msg_namelen = 0;
1743 1738
1744 return unix_dgram_sendmsg(kiocb, sock, msg, len); 1739 return unix_dgram_sendmsg(sock, msg, len);
1745} 1740}
1746 1741
1747static int unix_seqpacket_recvmsg(struct kiocb *iocb, struct socket *sock, 1742static int unix_seqpacket_recvmsg(struct socket *sock, struct msghdr *msg,
1748 struct msghdr *msg, size_t size, 1743 size_t size, int flags)
1749 int flags)
1750{ 1744{
1751 struct sock *sk = sock->sk; 1745 struct sock *sk = sock->sk;
1752 1746
1753 if (sk->sk_state != TCP_ESTABLISHED) 1747 if (sk->sk_state != TCP_ESTABLISHED)
1754 return -ENOTCONN; 1748 return -ENOTCONN;
1755 1749
1756 return unix_dgram_recvmsg(iocb, sock, msg, size, flags); 1750 return unix_dgram_recvmsg(sock, msg, size, flags);
1757} 1751}
1758 1752
1759static void unix_copy_addr(struct msghdr *msg, struct sock *sk) 1753static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
@@ -1766,9 +1760,8 @@ static void unix_copy_addr(struct msghdr *msg, struct sock *sk)
1766 } 1760 }
1767} 1761}
1768 1762
1769static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock, 1763static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
1770 struct msghdr *msg, size_t size, 1764 size_t size, int flags)
1771 int flags)
1772{ 1765{
1773 struct scm_cookie scm; 1766 struct scm_cookie scm;
1774 struct sock *sk = sock->sk; 1767 struct sock *sk = sock->sk;
@@ -1900,9 +1893,8 @@ static unsigned int unix_skb_len(const struct sk_buff *skb)
1900 return skb->len - UNIXCB(skb).consumed; 1893 return skb->len - UNIXCB(skb).consumed;
1901} 1894}
1902 1895
1903static int unix_stream_recvmsg(struct kiocb *iocb, struct socket *sock, 1896static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg,
1904 struct msghdr *msg, size_t size, 1897 size_t size, int flags)
1905 int flags)
1906{ 1898{
1907 struct scm_cookie scm; 1899 struct scm_cookie scm;
1908 struct sock *sk = sock->sk; 1900 struct sock *sk = sock->sk;
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 1d0e39c9a3e2..2ec86e652a19 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -949,8 +949,8 @@ static unsigned int vsock_poll(struct file *file, struct socket *sock,
949 return mask; 949 return mask;
950} 950}
951 951
952static int vsock_dgram_sendmsg(struct kiocb *kiocb, struct socket *sock, 952static int vsock_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
953 struct msghdr *msg, size_t len) 953 size_t len)
954{ 954{
955 int err; 955 int err;
956 struct sock *sk; 956 struct sock *sk;
@@ -1062,11 +1062,10 @@ out:
1062 return err; 1062 return err;
1063} 1063}
1064 1064
1065static int vsock_dgram_recvmsg(struct kiocb *kiocb, struct socket *sock, 1065static int vsock_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
1066 struct msghdr *msg, size_t len, int flags) 1066 size_t len, int flags)
1067{ 1067{
1068 return transport->dgram_dequeue(kiocb, vsock_sk(sock->sk), msg, len, 1068 return transport->dgram_dequeue(vsock_sk(sock->sk), msg, len, flags);
1069 flags);
1070} 1069}
1071 1070
1072static const struct proto_ops vsock_dgram_ops = { 1071static const struct proto_ops vsock_dgram_ops = {
@@ -1505,8 +1504,8 @@ static int vsock_stream_getsockopt(struct socket *sock,
1505 return 0; 1504 return 0;
1506} 1505}
1507 1506
1508static int vsock_stream_sendmsg(struct kiocb *kiocb, struct socket *sock, 1507static int vsock_stream_sendmsg(struct socket *sock, struct msghdr *msg,
1509 struct msghdr *msg, size_t len) 1508 size_t len)
1510{ 1509{
1511 struct sock *sk; 1510 struct sock *sk;
1512 struct vsock_sock *vsk; 1511 struct vsock_sock *vsk;
@@ -1644,9 +1643,8 @@ out:
1644 1643
1645 1644
1646static int 1645static int
1647vsock_stream_recvmsg(struct kiocb *kiocb, 1646vsock_stream_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
1648 struct socket *sock, 1647 int flags)
1649 struct msghdr *msg, size_t len, int flags)
1650{ 1648{
1651 struct sock *sk; 1649 struct sock *sk;
1652 struct vsock_sock *vsk; 1650 struct vsock_sock *vsk;
diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 7f3255084a6c..c294da095461 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -1730,8 +1730,7 @@ static int vmci_transport_dgram_enqueue(
1730 return err - sizeof(*dg); 1730 return err - sizeof(*dg);
1731} 1731}
1732 1732
1733static int vmci_transport_dgram_dequeue(struct kiocb *kiocb, 1733static int vmci_transport_dgram_dequeue(struct vsock_sock *vsk,
1734 struct vsock_sock *vsk,
1735 struct msghdr *msg, size_t len, 1734 struct msghdr *msg, size_t len,
1736 int flags) 1735 int flags)
1737{ 1736{
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index d9149b68b9bc..c3ab230e4493 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -1077,8 +1077,7 @@ out_clear_request:
1077 goto out; 1077 goto out;
1078} 1078}
1079 1079
1080static int x25_sendmsg(struct kiocb *iocb, struct socket *sock, 1080static int x25_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
1081 struct msghdr *msg, size_t len)
1082{ 1081{
1083 struct sock *sk = sock->sk; 1082 struct sock *sk = sock->sk;
1084 struct x25_sock *x25 = x25_sk(sk); 1083 struct x25_sock *x25 = x25_sk(sk);
@@ -1252,8 +1251,7 @@ out_kfree_skb:
1252} 1251}
1253 1252
1254 1253
1255static int x25_recvmsg(struct kiocb *iocb, struct socket *sock, 1254static int x25_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
1256 struct msghdr *msg, size_t size,
1257 int flags) 1255 int flags)
1258{ 1256{
1259 struct sock *sk = sock->sk; 1257 struct sock *sk = sock->sk;