aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-11-05 16:46:40 -0500
committerDavid S. Miller <davem@davemloft.net>2014-11-05 16:46:40 -0500
commit51f3d02b980a338cd291d2bc7629cdfb2568424b (patch)
treef49898ea87db3d5e3f5c248ab21f6ed0a70785b8 /net/tipc
parent1d76c1d028975df8488d1ae18a76f268eb5efa93 (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/tipc')
-rw-r--r--net/tipc/socket.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index ad8a1a1e2275..591bbfa082a0 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1372,8 +1372,7 @@ restart:
1372 sz = buf_len; 1372 sz = buf_len;
1373 m->msg_flags |= MSG_TRUNC; 1373 m->msg_flags |= MSG_TRUNC;
1374 } 1374 }
1375 res = skb_copy_datagram_iovec(buf, msg_hdr_sz(msg), 1375 res = skb_copy_datagram_msg(buf, msg_hdr_sz(msg), m, sz);
1376 m->msg_iov, sz);
1377 if (res) 1376 if (res)
1378 goto exit; 1377 goto exit;
1379 res = sz; 1378 res = sz;
@@ -1473,8 +1472,8 @@ restart:
1473 needed = (buf_len - sz_copied); 1472 needed = (buf_len - sz_copied);
1474 sz_to_copy = (sz <= needed) ? sz : needed; 1473 sz_to_copy = (sz <= needed) ? sz : needed;
1475 1474
1476 res = skb_copy_datagram_iovec(buf, msg_hdr_sz(msg) + offset, 1475 res = skb_copy_datagram_msg(buf, msg_hdr_sz(msg) + offset,
1477 m->msg_iov, sz_to_copy); 1476 m, sz_to_copy);
1478 if (res) 1477 if (res)
1479 goto exit; 1478 goto exit;
1480 1479