]> git.baikalelectronics.ru Git - kernel.git/commit
introduce copy_page_to_iter, kill loop over iovec in generic_file_aio_read()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 3 Feb 2014 22:07:03 +0000 (17:07 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 2 Apr 2014 03:19:21 +0000 (23:19 -0400)
commit0bf40b5ab50abf6adf282ed924b2661195bb5538
tree3babba99823f4f723a119a7ed61372baed4786bc
parent1b7c71b7df0aa1d72c1edbf60d9fd6fd3ddd5d00
introduce copy_page_to_iter, kill loop over iovec in generic_file_aio_read()

generic_file_aio_read() was looping over the target iovec, with loop over
(source) pages nested inside that.  Just set an iov_iter up and pass *that*
to do_generic_file_aio_read().  With copy_page_to_iter() doing all work
of mapping and copying a page to iovec and advancing iov_iter.

Switch shmem_file_aio_read() to the same and kill file_read_actor(), while
we are at it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/fs.h
include/linux/uio.h
mm/filemap.c
mm/shmem.c