summaryrefslogtreecommitdiff
path: root/include/linux/uio.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-02-01 04:08:47 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2015-02-18 06:21:11 +0300
commit4b8164b91d9fdff4dbac0a742d076bdff7fda21b (patch)
tree694a818c62c0716194e63179670af3035413ef74 /include/linux/uio.h
parentf5af19d10d151c5a2afae3306578f485c244db25 (diff)
downloadlinux-4b8164b91d9fdff4dbac0a742d076bdff7fda21b.tar.xz
new helper: dup_iter()
Copy iter and kmemdup the underlying array for the copy. Returns a pointer to result of kmemdup() to be kfree()'d later. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/uio.h')
-rw-r--r--include/linux/uio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h
index 07a022641996..71880299ed48 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -98,6 +98,8 @@ ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, struct page ***pages,
size_t maxsize, size_t *start);
int iov_iter_npages(const struct iov_iter *i, int maxpages);
+const void *dup_iter(struct iov_iter *new, struct iov_iter *old, gfp_t flags);
+
static inline size_t iov_iter_count(struct iov_iter *i)
{
return i->count;