gcc-4.4.4 (at least) screws up this initialization.
mm/page_io.c: In function '__swap_writepage':
mm/page_io.c:277: error: unknown field 'bvec' specified in initializer
mm/page_io.c:278: warning: excess elements in struct initializer
mm/page_io.c:278: warning: (near initialization for 'from')
Fixes
f990bbc9bfa3cbd2d ("bio_vec-backed iov_iter").
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
.count = PAGE_SIZE,
.iov_offset = 0,
.nr_segs = 1,
- .bvec = &bv
};
+ /* Do this by hand because old gcc messes up the initializer */
+ from.bvec = &bv;
+
init_sync_kiocb(&kiocb, swap_file);
kiocb.ki_pos = page_file_offset(page);
kiocb.ki_nbytes = PAGE_SIZE;