]> git.baikalelectronics.ru Git - kernel.git/commit
Add copy_to_iter(), copy_from_iter() and iov_iter_zero()
authorMatthew Wilcox <willy@linux.intel.com>
Fri, 1 Aug 2014 13:27:22 +0000 (09:27 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 9 Oct 2014 06:39:03 +0000 (02:39 -0400)
commitc4aa57763af5a60cf72edc2f6262afec46aefba4
tree6b1f1afc1c19bcbfc9c96f707c93627b0f4acbf3
parent05a96754724923a1f88c728577114ed19cd08120
Add copy_to_iter(), copy_from_iter() and iov_iter_zero()

For DAX, we want to be able to copy between iovecs and kernel addresses
that don't necessarily have a struct page.  This is a fairly simple
rearrangement for bvec iters to kmap the pages outside and pass them in,
but for user iovecs it gets more complicated because we might try various
different ways to kmap the memory.  Duplicating the existing logic works
out best in this case.

We need to be able to write zeroes to an iovec for reads from unwritten
ranges in a file.  This is performed by the new iov_iter_zero() function,
again patterned after the existing code that handles iovec iterators.

[AV: and export the buggers...]

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/uio.h
mm/iov_iter.c