All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH pre 3.16-rc1] bio: Fix build failure.
@ 2014-06-13 12:03 Tetsuo Handa
  2014-06-13 14:34 ` Chris Mason
  2014-06-13 14:48 ` Al Viro
  0 siblings, 2 replies; 6+ messages in thread
From: Tetsuo Handa @ 2014-06-13 12:03 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel

>From 75b9f78ddc8ab30555a520f5a2477a9340341dd1 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Fri, 13 Jun 2014 12:35:35 +0900
Subject: [PATCH pre 3.16-rc1] bio: Fix build failure.

Commit 62a8067a7f "bio_vec-backed iov_iter" introduced an unnamed union
inside a struct which gcc-4.4.7 cannot handle. Name the unnamed union as
u in order to fix build failure.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
 fs/fuse/file.c      |    6 ++--
 fs/splice.c         |    2 +-
 include/linux/uio.h |    6 ++--
 mm/iov_iter.c       |   64 +++++++++++++++++++++++++-------------------------
 mm/page_io.c        |    2 +-
 5 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 6e16dad..6ea6124 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1271,7 +1271,7 @@ static inline void fuse_page_descs_length_init(struct fuse_req *req,
 
 static inline unsigned long fuse_get_user_addr(const struct iov_iter *ii)
 {
-	return (unsigned long)ii->iov->iov_base + ii->iov_offset;
+	return (unsigned long)ii->u.iov->iov_base + ii->iov_offset;
 }
 
 static inline size_t fuse_get_frag_size(const struct iov_iter *ii,
@@ -2349,8 +2349,8 @@ static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov,
 		kaddr = kmap(page);
 
 		while (todo) {
-			char __user *uaddr = ii.iov->iov_base + ii.iov_offset;
-			size_t iov_len = ii.iov->iov_len - ii.iov_offset;
+			char __user *uaddr = ii.u.iov->iov_base + ii.iov_offset;
+			size_t iov_len = ii.u.iov->iov_len - ii.iov_offset;
 			size_t copy = min(todo, iov_len);
 			size_t left;
 
diff --git a/fs/splice.c b/fs/splice.c
index f5cb9ba..a50a379 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1007,7 +1007,7 @@ iter_file_splice_write(struct pipe_inode_info *pipe, struct file *out,
 
 		/* ... iov_iter */
 		from.type = ITER_BVEC | WRITE;
-		from.bvec = array;
+		from.u.bvec = array;
 		from.nr_segs = n;
 		from.count = sd.total_len - left;
 		from.iov_offset = 0;
diff --git a/include/linux/uio.h b/include/linux/uio.h
index e2231e4..9fb76ad 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -32,7 +32,7 @@ struct iov_iter {
 	union {
 		const struct iovec *iov;
 		const struct bio_vec *bvec;
-	};
+	} u;
 	unsigned long nr_segs;
 };
 
@@ -56,9 +56,9 @@ static inline size_t iov_length(const struct iovec *iov, unsigned long nr_segs)
 static inline struct iovec iov_iter_iovec(const struct iov_iter *iter)
 {
 	return (struct iovec) {
-		.iov_base = iter->iov->iov_base + iter->iov_offset,
+		.iov_base = iter->u.iov->iov_base + iter->iov_offset,
 		.iov_len = min(iter->count,
-			       iter->iov->iov_len - iter->iov_offset),
+			       iter->u.iov->iov_len - iter->iov_offset),
 	};
 }
 
diff --git a/mm/iov_iter.c b/mm/iov_iter.c
index 7b5dbd1..5165b82 100644
--- a/mm/iov_iter.c
+++ b/mm/iov_iter.c
@@ -19,7 +19,7 @@ static size_t copy_page_to_iter_iovec(struct page *page, size_t offset, size_t b
 		return 0;
 
 	wanted = bytes;
-	iov = i->iov;
+	iov = i->u.iov;
 	skip = i->iov_offset;
 	buf = iov->iov_base + skip;
 	copy = min(bytes, iov->iov_len - skip);
@@ -79,8 +79,8 @@ done:
 		skip = 0;
 	}
 	i->count -= wanted - bytes;
-	i->nr_segs -= iov - i->iov;
-	i->iov = iov;
+	i->nr_segs -= iov - i->u.iov;
+	i->u.iov = iov;
 	i->iov_offset = skip;
 	return wanted - bytes;
 }
@@ -100,7 +100,7 @@ static size_t copy_page_from_iter_iovec(struct page *page, size_t offset, size_t
 		return 0;
 
 	wanted = bytes;
-	iov = i->iov;
+	iov = i->u.iov;
 	skip = i->iov_offset;
 	buf = iov->iov_base + skip;
 	copy = min(bytes, iov->iov_len - skip);
@@ -160,8 +160,8 @@ done:
 		skip = 0;
 	}
 	i->count -= wanted - bytes;
-	i->nr_segs -= iov - i->iov;
-	i->iov = iov;
+	i->nr_segs -= iov - i->u.iov;
+	i->u.iov = iov;
 	i->iov_offset = skip;
 	return wanted - bytes;
 }
@@ -202,12 +202,12 @@ static size_t copy_from_user_atomic_iovec(struct page *page,
 	kaddr = kmap_atomic(page);
 	if (likely(i->nr_segs == 1)) {
 		int left;
-		char __user *buf = i->iov->iov_base + i->iov_offset;
+		char __user *buf = i->u.iov->iov_base + i->iov_offset;
 		left = __copy_from_user_inatomic(kaddr + offset, buf, bytes);
 		copied = bytes - left;
 	} else {
 		copied = __iovec_copy_from_user_inatomic(kaddr + offset,
-						i->iov, i->iov_offset, bytes);
+						i->u.iov, i->iov_offset, bytes);
 	}
 	kunmap_atomic(kaddr);
 
@@ -222,7 +222,7 @@ static void advance_iovec(struct iov_iter *i, size_t bytes)
 		i->iov_offset += bytes;
 		i->count -= bytes;
 	} else {
-		const struct iovec *iov = i->iov;
+		const struct iovec *iov = i->u.iov;
 		size_t base = i->iov_offset;
 		unsigned long nr_segs = i->nr_segs;
 
@@ -244,7 +244,7 @@ static void advance_iovec(struct iov_iter *i, size_t bytes)
 				base = 0;
 			}
 		}
-		i->iov = iov;
+		i->u.iov = iov;
 		i->iov_offset = base;
 		i->nr_segs = nr_segs;
 	}
@@ -262,8 +262,8 @@ static void advance_iovec(struct iov_iter *i, size_t bytes)
 int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
 {
 	if (!(i->type & ITER_BVEC)) {
-		char __user *buf = i->iov->iov_base + i->iov_offset;
-		bytes = min(bytes, i->iov->iov_len - i->iov_offset);
+		char __user *buf = i->u.iov->iov_base + i->iov_offset;
+		bytes = min(bytes, i->u.iov->iov_len - i->iov_offset);
 		return fault_in_pages_readable(buf, bytes);
 	}
 	return 0;
@@ -272,7 +272,7 @@ EXPORT_SYMBOL(iov_iter_fault_in_readable);
 
 static unsigned long alignment_iovec(const struct iov_iter *i)
 {
-	const struct iovec *iov = i->iov;
+	const struct iovec *iov = i->u.iov;
 	unsigned long res;
 	size_t size = i->count;
 	size_t n;
@@ -302,7 +302,7 @@ void iov_iter_init(struct iov_iter *i, int direction,
 	if (segment_eq(get_fs(), KERNEL_DS))
 		direction |= ITER_KVEC;
 	i->type = direction;
-	i->iov = iov;
+	i->u.iov = iov;
 	i->nr_segs = nr_segs;
 	i->iov_offset = 0;
 	i->count = count;
@@ -314,7 +314,7 @@ static ssize_t get_pages_iovec(struct iov_iter *i,
 		   size_t *start)
 {
 	size_t offset = i->iov_offset;
-	const struct iovec *iov = i->iov;
+	const struct iovec *iov = i->u.iov;
 	size_t len;
 	unsigned long addr;
 	int n;
@@ -340,7 +340,7 @@ static ssize_t get_pages_alloc_iovec(struct iov_iter *i,
 		   size_t *start)
 {
 	size_t offset = i->iov_offset;
-	const struct iovec *iov = i->iov;
+	const struct iovec *iov = i->u.iov;
 	size_t len;
 	unsigned long addr;
 	void *p;
@@ -376,7 +376,7 @@ static int iov_iter_npages_iovec(const struct iov_iter *i, int maxpages)
 {
 	size_t offset = i->iov_offset;
 	size_t size = i->count;
-	const struct iovec *iov = i->iov;
+	const struct iovec *iov = i->u.iov;
 	int npages = 0;
 	int n;
 
@@ -426,7 +426,7 @@ static size_t copy_page_to_iter_bvec(struct page *page, size_t offset, size_t by
 		return 0;
 
 	wanted = bytes;
-	bvec = i->bvec;
+	bvec = i->u.bvec;
 	skip = i->iov_offset;
 	copy = min_t(size_t, bytes, bvec->bv_len - skip);
 
@@ -450,8 +450,8 @@ static size_t copy_page_to_iter_bvec(struct page *page, size_t offset, size_t by
 		skip = 0;
 	}
 	i->count -= wanted - bytes;
-	i->nr_segs -= bvec - i->bvec;
-	i->bvec = bvec;
+	i->nr_segs -= bvec - i->u.bvec;
+	i->u.bvec = bvec;
 	i->iov_offset = skip;
 	return wanted - bytes;
 }
@@ -470,7 +470,7 @@ static size_t copy_page_from_iter_bvec(struct page *page, size_t offset, size_t
 		return 0;
 
 	wanted = bytes;
-	bvec = i->bvec;
+	bvec = i->u.bvec;
 	skip = i->iov_offset;
 
 	kaddr = kmap_atomic(page);
@@ -499,8 +499,8 @@ static size_t copy_page_from_iter_bvec(struct page *page, size_t offset, size_t
 		skip = 0;
 	}
 	i->count -= wanted;
-	i->nr_segs -= bvec - i->bvec;
-	i->bvec = bvec;
+	i->nr_segs -= bvec - i->u.bvec;
+	i->u.bvec = bvec;
 	i->iov_offset = skip;
 	return wanted;
 }
@@ -514,7 +514,7 @@ static size_t copy_from_user_bvec(struct page *page,
 	size_t base = i->iov_offset;
 
 	kaddr = kmap_atomic(page);
-	for (left = bytes, bvec = i->bvec; left; bvec++, base = 0) {
+	for (left = bytes, bvec = i->u.bvec; left; bvec++, base = 0) {
 		size_t copy = min(left, bvec->bv_len - base);
 		if (!bvec->bv_len)
 			continue;
@@ -535,7 +535,7 @@ static void advance_bvec(struct iov_iter *i, size_t bytes)
 		i->iov_offset += bytes;
 		i->count -= bytes;
 	} else {
-		const struct bio_vec *bvec = i->bvec;
+		const struct bio_vec *bvec = i->u.bvec;
 		size_t base = i->iov_offset;
 		unsigned long nr_segs = i->nr_segs;
 
@@ -557,7 +557,7 @@ static void advance_bvec(struct iov_iter *i, size_t bytes)
 				base = 0;
 			}
 		}
-		i->bvec = bvec;
+		i->u.bvec = bvec;
 		i->iov_offset = base;
 		i->nr_segs = nr_segs;
 	}
@@ -565,7 +565,7 @@ static void advance_bvec(struct iov_iter *i, size_t bytes)
 
 static unsigned long alignment_bvec(const struct iov_iter *i)
 {
-	const struct bio_vec *bvec = i->bvec;
+	const struct bio_vec *bvec = i->u.bvec;
 	unsigned long res;
 	size_t size = i->count;
 	size_t n;
@@ -591,7 +591,7 @@ static ssize_t get_pages_bvec(struct iov_iter *i,
 		   struct page **pages, size_t maxsize,
 		   size_t *start)
 {
-	const struct bio_vec *bvec = i->bvec;
+	const struct bio_vec *bvec = i->u.bvec;
 	size_t len = bvec->bv_len - i->iov_offset;
 	if (len > i->count)
 		len = i->count;
@@ -608,7 +608,7 @@ static ssize_t get_pages_alloc_bvec(struct iov_iter *i,
 		   struct page ***pages, size_t maxsize,
 		   size_t *start)
 {
-	const struct bio_vec *bvec = i->bvec;
+	const struct bio_vec *bvec = i->u.bvec;
 	size_t len = bvec->bv_len - i->iov_offset;
 	if (len > i->count)
 		len = i->count;
@@ -629,7 +629,7 @@ static int iov_iter_npages_bvec(const struct iov_iter *i, int maxpages)
 {
 	size_t offset = i->iov_offset;
 	size_t size = i->count;
-	const struct bio_vec *bvec = i->bvec;
+	const struct bio_vec *bvec = i->u.bvec;
 	int npages = 0;
 	int n;
 
@@ -696,9 +696,9 @@ size_t iov_iter_single_seg_count(const struct iov_iter *i)
 	if (i->nr_segs == 1)
 		return i->count;
 	else if (i->type & ITER_BVEC)
-		return min(i->count, i->iov->iov_len - i->iov_offset);
+		return min(i->count, i->u.iov->iov_len - i->iov_offset);
 	else
-		return min(i->count, i->bvec->bv_len - i->iov_offset);
+		return min(i->count, i->u.bvec->bv_len - i->iov_offset);
 }
 EXPORT_SYMBOL(iov_iter_single_seg_count);
 
diff --git a/mm/page_io.c b/mm/page_io.c
index 243a9b7..875a460 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -274,7 +274,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
 			.count = PAGE_SIZE,
 			.iov_offset = 0,
 			.nr_segs = 1,
-			.bvec = &bv
+			.u.bvec = &bv
 		};
 
 		init_sync_kiocb(&kiocb, swap_file);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH pre 3.16-rc1] bio: Fix build failure.
  2014-06-13 12:03 [PATCH pre 3.16-rc1] bio: Fix build failure Tetsuo Handa
@ 2014-06-13 14:34 ` Chris Mason
  2014-06-13 14:48 ` Al Viro
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Mason @ 2014-06-13 14:34 UTC (permalink / raw)
  To: Tetsuo Handa, viro; +Cc: linux-fsdevel

On 06/13/2014 08:03 AM, Tetsuo Handa wrote:
>>From 75b9f78ddc8ab30555a520f5a2477a9340341dd1 Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Fri, 13 Jun 2014 12:35:35 +0900
> Subject: [PATCH pre 3.16-rc1] bio: Fix build failure.
> 
> Commit 62a8067a7f "bio_vec-backed iov_iter" introduced an unnamed union
> inside a struct which gcc-4.4.7 cannot handle. Name the unnamed union as
> u in order to fix build failure.

Same problem here.  Jens tracked it down to the anon union and the named
initialization done in page_io.c

> diff --git a/mm/page_io.c b/mm/page_io.c
> index 243a9b7..875a460 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -274,7 +274,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
>  			.count = PAGE_SIZE,
>  			.iov_offset = 0,
>  			.nr_segs = 1,
> -			.bvec = &bv
> +			.u.bvec = &bv
>  		};
>  
>  		init_sync_kiocb(&kiocb, swap_file);
> 


-chris

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH pre 3.16-rc1] bio: Fix build failure.
  2014-06-13 12:03 [PATCH pre 3.16-rc1] bio: Fix build failure Tetsuo Handa
  2014-06-13 14:34 ` Chris Mason
@ 2014-06-13 14:48 ` Al Viro
  2014-06-14  6:12   ` [PATCH] fix __swap_writepage() compile failure on old gcc versions Al Viro
  1 sibling, 1 reply; 6+ messages in thread
From: Al Viro @ 2014-06-13 14:48 UTC (permalink / raw)
  To: Tetsuo Handa; +Cc: linux-fsdevel

On Fri, Jun 13, 2014 at 09:03:36PM +0900, Tetsuo Handa wrote:
> >From 75b9f78ddc8ab30555a520f5a2477a9340341dd1 Mon Sep 17 00:00:00 2001
> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> Date: Fri, 13 Jun 2014 12:35:35 +0900
> Subject: [PATCH pre 3.16-rc1] bio: Fix build failure.
> 
> Commit 62a8067a7f "bio_vec-backed iov_iter" introduced an unnamed union
> inside a struct which gcc-4.4.7 cannot handle. Name the unnamed union as
> u in order to fix build failure.

Sigh...  Oh, well - it will be a while until we can use them (anon union
and struct members are valid C11; it's not just gccism).  Applied, will
push to Linus today if he hasn't picked that one up himself.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] fix __swap_writepage() compile failure on old gcc versions
  2014-06-13 14:48 ` Al Viro
@ 2014-06-14  6:12   ` Al Viro
  2014-06-15  1:33     ` Tetsuo Handa
  2014-06-16 17:55     ` Chris Mason
  0 siblings, 2 replies; 6+ messages in thread
From: Al Viro @ 2014-06-14  6:12 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-fsdevel, Tetsuo Handa

On Fri, Jun 13, 2014 at 03:48:43PM +0100, Al Viro wrote:
> On Fri, Jun 13, 2014 at 09:03:36PM +0900, Tetsuo Handa wrote:
> > >From 75b9f78ddc8ab30555a520f5a2477a9340341dd1 Mon Sep 17 00:00:00 2001
> > From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> > Date: Fri, 13 Jun 2014 12:35:35 +0900
> > Subject: [PATCH pre 3.16-rc1] bio: Fix build failure.
> > 
> > Commit 62a8067a7f "bio_vec-backed iov_iter" introduced an unnamed union
> > inside a struct which gcc-4.4.7 cannot handle. Name the unnamed union as
> > u in order to fix build failure.
> 
> Sigh...  Oh, well - it will be a while until we can use them (anon union
> and struct members are valid C11; it's not just gccism).  Applied, will
> push to Linus today if he hasn't picked that one up himself.

Let's do this instead: there is only one place in the entire tree that
steps into this breakage.  Anon structs and unions work in older gcc
versions; as the matter of fact, we have those in the tree - see e.g.
struct ieee80211_tx_info in include/net/mac80211.h

What doesn't work is handling their initializers:

struct {
	int a;
	union {
		int b;
		char c;
	};
} x[2] = {{.a = 1, .c = 'a'}, {.a = 0, .b = 1}};

is the obvious syntax for initializer, perfectly fine for C11 and handled
correctly by gcc-4.7 or later.  Earlier versions, though, break on it -
declaration is fine and so's access to fields (i.e. x[0].c = 'a'; would
produce the right code), but members of the anon structs and unions are
not inserted into the right namespace.  Tellingly, those older versions
will not barf on struct {int a; struct {int a;};}; - looks like they
just have it hacked up somewhere around the handling of . and -> instead
of doing the right thing.

The easiest way to deal with that crap is to turn initialization of those
fields (in the only place where we have such initializer of iov_iter)
into plain assignment.

Spotted-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Spotted-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/mm/page_io.c b/mm/page_io.c
index 33bb38c..fe24f78 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -269,8 +269,8 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
 			.count = PAGE_SIZE,
 			.iov_offset = 0,
 			.nr_segs = 1,
-			.bvec = &bv
 		};
+		from.bvec = &bv;	/* older gcc versions are broken */
 
 		init_sync_kiocb(&kiocb, swap_file);
 		kiocb.ki_pos = page_file_offset(page);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] fix __swap_writepage() compile failure on old gcc versions
  2014-06-14  6:12   ` [PATCH] fix __swap_writepage() compile failure on old gcc versions Al Viro
@ 2014-06-15  1:33     ` Tetsuo Handa
  2014-06-16 17:55     ` Chris Mason
  1 sibling, 0 replies; 6+ messages in thread
From: Tetsuo Handa @ 2014-06-15  1:33 UTC (permalink / raw)
  To: viro; +Cc: torvalds, linux-fsdevel

Al Viro wrote:
> The easiest way to deal with that crap is to turn initialization of those
> fields (in the only place where we have such initializer of iov_iter)
> into plain assignment.

OK. It passed my tests on gcc 4.4.7. Thank you.



Well, gcc 3.3.5-13 / binutils 2.15-6 can no longer build current kernel.

  arch/x86/boot/bioscall.S: Assembler messages:
  arch/x86/boot/bioscall.S:68: Error: `68(%esp)' is not a valid 16 bit base/index expression
  make[3]: *** [arch/x86/realmode/rm/bioscall.o] Error 1

Time to update Current Minimal Requirements in Documentation/Changes ?

  o  Gnu C                  3.2                     # gcc --version
  o  binutils               2.12                    # ld -v

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] fix __swap_writepage() compile failure on old gcc versions
  2014-06-14  6:12   ` [PATCH] fix __swap_writepage() compile failure on old gcc versions Al Viro
  2014-06-15  1:33     ` Tetsuo Handa
@ 2014-06-16 17:55     ` Chris Mason
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Mason @ 2014-06-16 17:55 UTC (permalink / raw)
  To: Al Viro, Linus Torvalds; +Cc: linux-fsdevel, Tetsuo Handa



On 06/14/2014 02:12 AM, Al Viro wrote:
> On Fri, Jun 13, 2014 at 03:48:43PM +0100, Al Viro wrote:
>> On Fri, Jun 13, 2014 at 09:03:36PM +0900, Tetsuo Handa wrote:
>>> >From 75b9f78ddc8ab30555a520f5a2477a9340341dd1 Mon Sep 17 00:00:00 2001
>>> From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
>>> Date: Fri, 13 Jun 2014 12:35:35 +0900
>>> Subject: [PATCH pre 3.16-rc1] bio: Fix build failure.
>>>
>>> Commit 62a8067a7f "bio_vec-backed iov_iter" introduced an unnamed union
>>> inside a struct which gcc-4.4.7 cannot handle. Name the unnamed union as
>>> u in order to fix build failure.
>>
>> Sigh...  Oh, well - it will be a while until we can use them (anon union
>> and struct members are valid C11; it's not just gccism).  Applied, will
>> push to Linus today if he hasn't picked that one up himself.
> 
> Let's do this instead: there is only one place in the entire tree that
> steps into this breakage.  Anon structs and unions work in older gcc
> versions; as the matter of fact, we have those in the tree - see e.g.
> struct ieee80211_tx_info in include/net/mac80211.h
> 
> What doesn't work is handling their initializers:

[ ... ]

> ---
> diff --git a/mm/page_io.c b/mm/page_io.c
> index 33bb38c..fe24f78 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -269,8 +269,8 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
>  			.count = PAGE_SIZE,
>  			.iov_offset = 0,
>  			.nr_segs = 1,
> -			.bvec = &bv
>  		};
> +		from.bvec = &bv;	/* older gcc versions are broken */

This was how I tested before my last pull request, it was enough to
compile on gcc 4.4.6.

-chris

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-16 17:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 12:03 [PATCH pre 3.16-rc1] bio: Fix build failure Tetsuo Handa
2014-06-13 14:34 ` Chris Mason
2014-06-13 14:48 ` Al Viro
2014-06-14  6:12   ` [PATCH] fix __swap_writepage() compile failure on old gcc versions Al Viro
2014-06-15  1:33     ` Tetsuo Handa
2014-06-16 17:55     ` Chris Mason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.