summaryrefslogtreecommitdiffstats
path: root/mm/page_io.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-01-23 01:08:07 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-01-29 00:13:11 -0500
commit05afcb77eb4713f46e7ebaa3cb54bc465c5d516e (patch)
treefeeafbb29a9a41fb7d85ff55fdb624eaa918907f /mm/page_io.c
parent26bc420b59a38e4e6685a73345a0def461136dce (diff)
downloadblackbird-op-linux-05afcb77eb4713f46e7ebaa3cb54bc465c5d516e.tar.gz
blackbird-op-linux-05afcb77eb4713f46e7ebaa3cb54bc465c5d516e.zip
new helper: iov_iter_bvec()
similar to iov_iter_kvec(), for ITER_BVEC ones Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/page_io.c')
-rw-r--r--mm/page_io.c9
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;
OpenPOWER on IntegriCloud