aboutsummaryrefslogtreecommitdiffstats
path: root/net/l2tp
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 /net/l2tp
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 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_ip.c4
-rw-r--r--net/l2tp/l2tp_ip6.c8
-rw-r--r--net/l2tp/l2tp_ppp.c7
3 files changed, 8 insertions, 11 deletions
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 };