From: Andrew Morton Date: Sat, 17 May 2014 13:19:15 +0000 (+1000) Subject: mm/page_io.c: work around gcc bug X-Git-Tag: next-20140519~3^2~73 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=63acbc17f7084c08dd8bb05645b1a37c55758c3b;p=karo-tx-linux.git mm/page_io.c: work around gcc bug 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 Signed-off-by: Andrew Morton --- diff --git a/mm/page_io.c b/mm/page_io.c index 243a9b76e5ce..1ee120adbb45 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -274,9 +274,11 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc, .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;