aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_io.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-03-04 21:27:34 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-05-06 17:32:44 -0400
commitd8d3d94b80aa1a1c0ca75c58b8abdc7356f38418 (patch)
tree132f846b04371426b8795475597846aae75e7e07 /mm/page_io.c
parentcb66a7a1f149ff705fa37cad6d1252b046e0ad4f (diff)
pass iov_iter to ->direct_IO()
unmodified, for now Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/page_io.c')
-rw-r--r--mm/page_io.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index 7c59ef681381..0ed0644c73db 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -263,16 +263,18 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
263 .iov_base = kmap(page), 263 .iov_base = kmap(page),
264 .iov_len = PAGE_SIZE, 264 .iov_len = PAGE_SIZE,
265 }; 265 };
266 struct iov_iter from;
266 267
267 init_sync_kiocb(&kiocb, swap_file); 268 init_sync_kiocb(&kiocb, swap_file);
268 kiocb.ki_pos = page_file_offset(page); 269 kiocb.ki_pos = page_file_offset(page);
269 kiocb.ki_nbytes = PAGE_SIZE; 270 kiocb.ki_nbytes = PAGE_SIZE;
271 iov_iter_init(&from, &iov, 1, PAGE_SIZE, 0);
270 272
271 set_page_writeback(page); 273 set_page_writeback(page);
272 unlock_page(page); 274 unlock_page(page);
273 ret = mapping->a_ops->direct_IO(KERNEL_WRITE, 275 ret = mapping->a_ops->direct_IO(KERNEL_WRITE,
274 &kiocb, &iov, 276 &kiocb, &from,
275 kiocb.ki_pos, 1); 277 kiocb.ki_pos);
276 kunmap(page); 278 kunmap(page);
277 if (ret == PAGE_SIZE) { 279 if (ret == PAGE_SIZE) {
278 count_vm_event(PSWPOUT); 280 count_vm_event(PSWPOUT);