summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-06 01:28:09 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 23:32:49 +0200
commit71d8e532b1549a478e6a6a8a44f309d050294d00 (patch)
tree58b40c17cbb806c94aa07121a8b010d16f825d27 /include
parentnew helper: generic_file_read_iter() (diff)
downloadlinux-71d8e532b1549a478e6a6a8a44f309d050294d00.tar.xz
linux-71d8e532b1549a478e6a6a8a44f309d050294d00.zip
start adding the tag to iov_iter
For now, just use the same thing we pass to ->direct_IO() - it's all iovec-based at the moment. Pass it explicitly to iov_iter_init() and account for kvec vs. iovec in there, by the same kludge NFS ->direct_IO() uses. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/uio.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h
index 4ee17413fe1b..b80bbe197d13 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -20,6 +20,7 @@ struct kvec {
};
struct iov_iter {
+ int type;
const struct iovec *iov;
unsigned long nr_segs;
size_t iov_offset;
@@ -68,18 +69,8 @@ size_t iov_iter_single_seg_count(const struct iov_iter *i);
size_t copy_page_to_iter(struct page *page, size_t offset, size_t bytes,
struct iov_iter *i);
unsigned long iov_iter_alignment(const struct iov_iter *i);
-
-static inline void iov_iter_init(struct iov_iter *i,
- const struct iovec *iov, unsigned long nr_segs,
- size_t count, size_t written)
-{
- i->iov = iov;
- i->nr_segs = nr_segs;
- i->iov_offset = 0;
- i->count = count + written;
-
- iov_iter_advance(i, written);
-}
+void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov,
+ unsigned long nr_segs, size_t count);
static inline size_t iov_iter_count(struct iov_iter *i)
{