diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-18 00:48:33 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-18 00:48:33 +0100 |
commit | 66dc830d14a222c9214a8557e9feb1e4a67a3857 (patch) | |
tree | d5bd699150fecfe5b2ebfddd9db651389480937d /mm/page_io.c | |
parent | Merge branch 'getname2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro... (diff) | |
parent | fs: add vfs_iter_{read,write} helpers (diff) | |
download | linux-66dc830d14a222c9214a8557e9feb1e4a67a3857.tar.xz linux-66dc830d14a222c9214a8557e9feb1e4a67a3857.zip |
Merge branch 'iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull iov_iter updates from Al Viro:
"More iov_iter work - missing counterpart of iov_iter_init() for
bvec-backed ones and vfs_read_iter()/vfs_write_iter() - wrappers for
sync calls of ->read_iter()/->write_iter()"
* 'iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fs: add vfs_iter_{read,write} helpers
new helper: iov_iter_bvec()
Diffstat (limited to 'mm/page_io.c')
-rw-r--r-- | mm/page_io.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mm/page_io.c b/mm/page_io.c index 955db8b0d497..e6045804c8d8 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -269,14 +269,9 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, .bv_len = PAGE_SIZE, .bv_offset = 0 }; - struct iov_iter from = { - .type = ITER_BVEC | WRITE, - .count = PAGE_SIZE, - .iov_offset = 0, - .nr_segs = 1, - }; - from.bvec = &bv; /* older gcc versions are broken */ + struct iov_iter from; + iov_iter_bvec(&from, ITER_BVEC | WRITE, &bv, 1, PAGE_SIZE); init_sync_kiocb(&kiocb, swap_file); kiocb.ki_pos = page_file_offset(page); kiocb.ki_nbytes = PAGE_SIZE; |