diff options
author | David S. Miller <davem@davemloft.net> | 2014-11-05 16:46:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-05 16:46:40 -0500 |
commit | 51f3d02b980a338cd291d2bc7629cdfb2568424b (patch) | |
tree | f49898ea87db3d5e3f5c248ab21f6ed0a70785b8 /net/l2tp | |
parent | 1d76c1d028975df8488d1ae18a76f268eb5efa93 (diff) |
net: Add and use skb_copy_datagram_msg() helper.
This encapsulates all of the skb_copy_datagram_iovec() callers
with call argument signature "skb, offset, msghdr->msg_iov, length".
When we move to iov_iters in the networking, the iov_iter object will
sit in the msghdr.
Having a helper like this means there will be less places to touch
during that transformation.
Based upon descriptions and patch from Al Viro.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/l2tp')
-rw-r--r-- | net/l2tp/l2tp_ip.c | 2 | ||||
-rw-r--r-- | net/l2tp/l2tp_ip6.c | 2 | ||||
-rw-r--r-- | net/l2tp/l2tp_ppp.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c index 369a9822488c..a6cc1fed2b52 100644 --- a/net/l2tp/l2tp_ip.c +++ b/net/l2tp/l2tp_ip.c | |||
@@ -528,7 +528,7 @@ static int l2tp_ip_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *m | |||
528 | copied = len; | 528 | copied = len; |
529 | } | 529 | } |
530 | 530 | ||
531 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 531 | err = skb_copy_datagram_msg(skb, 0, msg, copied); |
532 | if (err) | 532 | if (err) |
533 | goto done; | 533 | goto done; |
534 | 534 | ||
diff --git a/net/l2tp/l2tp_ip6.c b/net/l2tp/l2tp_ip6.c index 0edb263cc002..2177b960da87 100644 --- a/net/l2tp/l2tp_ip6.c +++ b/net/l2tp/l2tp_ip6.c | |||
@@ -672,7 +672,7 @@ static int l2tp_ip6_recvmsg(struct kiocb *iocb, struct sock *sk, | |||
672 | copied = len; | 672 | copied = len; |
673 | } | 673 | } |
674 | 674 | ||
675 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 675 | err = skb_copy_datagram_msg(skb, 0, msg, copied); |
676 | if (err) | 676 | if (err) |
677 | goto done; | 677 | goto done; |
678 | 678 | ||
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c index b704a9356208..c559bcdf4679 100644 --- a/net/l2tp/l2tp_ppp.c +++ b/net/l2tp/l2tp_ppp.c | |||
@@ -208,7 +208,7 @@ static int pppol2tp_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
208 | else if (len < skb->len) | 208 | else if (len < skb->len) |
209 | msg->msg_flags |= MSG_TRUNC; | 209 | msg->msg_flags |= MSG_TRUNC; |
210 | 210 | ||
211 | err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, len); | 211 | err = skb_copy_datagram_msg(skb, 0, msg, len); |
212 | if (likely(err == 0)) | 212 | if (likely(err == 0)) |
213 | err = len; | 213 | err = len; |
214 | 214 | ||