diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-06 01:28:09 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-05-06 23:32:49 +0200 |
commit | 71d8e532b1549a478e6a6a8a44f309d050294d00 (patch) | |
tree | 58b40c17cbb806c94aa07121a8b010d16f825d27 /mm/iov_iter.c | |
parent | new helper: generic_file_read_iter() (diff) | |
download | linux-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 'mm/iov_iter.c')
-rw-r--r-- | mm/iov_iter.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mm/iov_iter.c b/mm/iov_iter.c index 2f762cc21080..e2c9a2db4350 100644 --- a/mm/iov_iter.c +++ b/mm/iov_iter.c @@ -220,3 +220,18 @@ unsigned long iov_iter_alignment(const struct iov_iter *i) return res; } EXPORT_SYMBOL(iov_iter_alignment); + +void iov_iter_init(struct iov_iter *i, int direction, + const struct iovec *iov, unsigned long nr_segs, + size_t count) +{ + /* It will get better. Eventually... */ + if (segment_eq(get_fs(), KERNEL_DS)) + direction |= REQ_KERNEL; + i->type = direction; + i->iov = iov; + i->nr_segs = nr_segs; + i->iov_offset = 0; + i->count = count; +} +EXPORT_SYMBOL(iov_iter_init); |