diff options
author | Sagi Grimberg <sagi@lightbitslabs.com> | 2018-12-03 20:52:07 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-12-13 03:58:53 -0500 |
commit | cb002d074dabfaa2248507fd9478d16a542e4f1e (patch) | |
tree | 9aac7c054f558aedd9d57f1dd19fdc8e3b20fa26 | |
parent | 0fc07791bc775478d9450ca9c6c674b45f6c1998 (diff) |
iov_iter: pass void csum pointer to csum_and_copy_to_iter
The single caller to csum_and_copy_to_iter is skb_copy_and_csum_datagram
and we are trying to unite its logic with skb_copy_datagram_iter by passing
a callback to the copy function that we want to apply. Thus, we need
to make the checksum pointer private to the function.
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | include/linux/uio.h | 2 | ||||
-rw-r--r-- | lib/iov_iter.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index 55ce99ddb912..41d1f8d3313d 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h | |||
@@ -266,7 +266,7 @@ static inline void iov_iter_reexpand(struct iov_iter *i, size_t count) | |||
266 | { | 266 | { |
267 | i->count = count; | 267 | i->count = count; |
268 | } | 268 | } |
269 | size_t csum_and_copy_to_iter(const void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); | 269 | size_t csum_and_copy_to_iter(const void *addr, size_t bytes, void *csump, struct iov_iter *i); |
270 | size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); | 270 | size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); |
271 | bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); | 271 | bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); |
272 | 272 | ||
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index 54c248526b55..63a8999a234d 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c | |||
@@ -1464,10 +1464,11 @@ bool csum_and_copy_from_iter_full(void *addr, size_t bytes, __wsum *csum, | |||
1464 | } | 1464 | } |
1465 | EXPORT_SYMBOL(csum_and_copy_from_iter_full); | 1465 | EXPORT_SYMBOL(csum_and_copy_from_iter_full); |
1466 | 1466 | ||
1467 | size_t csum_and_copy_to_iter(const void *addr, size_t bytes, __wsum *csum, | 1467 | size_t csum_and_copy_to_iter(const void *addr, size_t bytes, void *csump, |
1468 | struct iov_iter *i) | 1468 | struct iov_iter *i) |
1469 | { | 1469 | { |
1470 | const char *from = addr; | 1470 | const char *from = addr; |
1471 | __wsum *csum = csump; | ||
1471 | __wsum sum, next; | 1472 | __wsum sum, next; |
1472 | size_t off = 0; | 1473 | size_t off = 0; |
1473 | 1474 | ||