aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
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 /include/net
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>
Diffstat (limited to 'include/net')
-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
7 files changed, 23 insertions, 29 deletions
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);