aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/uio.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-21 04:58:33 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:32:53 -0400
commit91f79c43d1b54d7154b118860d81b39bad07dfff (patch)
treea5b142ba57fdabf835476b6dbca24288a78f0c53 /include/linux/uio.h
parentf67da30c1d5fc9e341bc8121708874bfd7b31e45 (diff)
new helper: iov_iter_get_pages_alloc()
same as iov_iter_get_pages(), except that pages array is allocated (kmalloc if possible, vmalloc if that fails) and left for caller to free. Lustre and NFS ->direct_IO() switched to it. 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 2f8825b06680..4876e9f2a58f 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -73,6 +73,8 @@ void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov,
73 unsigned long nr_segs, size_t count); 73 unsigned long nr_segs, size_t count);
74ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, 74ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages,
75 size_t maxsize, size_t *start); 75 size_t maxsize, size_t *start);
76ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, struct page ***pages,
77 size_t maxsize, size_t *start);
76int iov_iter_npages(const struct iov_iter *i, int maxpages); 78int iov_iter_npages(const struct iov_iter *i, int maxpages);
77 79
78static inline size_t iov_iter_count(struct iov_iter *i) 80static inline size_t iov_iter_count(struct iov_iter *i)