2008-07-26 17:19:18

by Haavard Skinnemoen

[permalink] [raw]
Subject: [PATCH] include/asm-generic/tlb.h must include <linux/pagemap.h>

This fixes the following compile error on avr32, introduced by
commit ba92a43dbaee339cf5915ef766d3d3ffbaaf103c
(exec: remove some includes):

In file included from include/asm/tlb.h:24,
from fs/exec.c:55:
include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
include/asm-generic/tlb.h: In function 'tlb_remove_page':
include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
make[1]: *** [fs/exec.o] Error 1

Signed-off-by: Haavard Skinnemoen <[email protected]>
---
include/asm-generic/tlb.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index f490e43..f85f3a2 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -13,6 +13,7 @@
#ifndef _ASM_GENERIC__TLB_H
#define _ASM_GENERIC__TLB_H

+#include <linux/pagemap.h>
#include <linux/swap.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
--
1.5.6.2


2008-07-26 17:39:17

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, Jul 26, 2008 at 07:18:05PM +0200, Haavard Skinnemoen wrote:
> This fixes the following compile error on avr32, introduced by
> commit ba92a43dbaee339cf5915ef766d3d3ffbaaf103c
> (exec: remove some includes):
>
> In file included from include/asm/tlb.h:24,
> from fs/exec.c:55:
> include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
> include/asm-generic/tlb.h: In function 'tlb_remove_page':
> include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
> make[1]: *** [fs/exec.o] Error 1
>
> Signed-off-by: Haavard Skinnemoen <[email protected]>
> ---
> include/asm-generic/tlb.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
> index f490e43..f85f3a2 100644
> --- a/include/asm-generic/tlb.h
> +++ b/include/asm-generic/tlb.h
> @@ -13,6 +13,7 @@
> #ifndef _ASM_GENERIC__TLB_H
> #define _ASM_GENERIC__TLB_H
>
> +#include <linux/pagemap.h>
> #include <linux/swap.h>
> #include <asm/pgalloc.h>
> #include <asm/tlbflush.h>

The patch is not the correct fix since the actual problem comes from
free_pages_and_swap_cache() in swap.h

Patch is below, but it has not yet gotten enough testing that I'm 100%
confident it doesn't break anything else...

cu
Adrian


<-- snip -->


This patch fixes the following build error:

<-- snip -->

...
CC fs/exec.o
In file included from include2/asm/tlb.h:24,
from /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/exec.c:55:
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_remove_page':
/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
make[2]: *** [fs/exec.o] Error 1

<-- snip -->

Signed-off-by: Adrian Bunk <[email protected]>

---
2dab88e59c7ec942df29bbdee041e54edeee1d25
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 0b33776..f835058 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -7,6 +7,7 @@
#include <linux/list.h>
#include <linux/memcontrol.h>
#include <linux/sched.h>
+#include <linux/pagemap.h>

#include <asm/atomic.h>
#include <asm/page.h>

2008-07-26 17:59:41

by Johannes Weiner

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

Hi,

Adrian Bunk <[email protected]> writes:

> On Sat, Jul 26, 2008 at 07:18:05PM +0200, Haavard Skinnemoen wrote:
>> This fixes the following compile error on avr32, introduced by
>> commit ba92a43dbaee339cf5915ef766d3d3ffbaaf103c
>> (exec: remove some includes):
>>
>> In file included from include/asm/tlb.h:24,
>> from fs/exec.c:55:
>> include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
>> include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
>> include/asm-generic/tlb.h: In function 'tlb_remove_page':
>> include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
>> make[1]: *** [fs/exec.o] Error 1
>>
>> Signed-off-by: Haavard Skinnemoen <[email protected]>
>> ---
>> include/asm-generic/tlb.h | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
>> index f490e43..f85f3a2 100644
>> --- a/include/asm-generic/tlb.h
>> +++ b/include/asm-generic/tlb.h
>> @@ -13,6 +13,7 @@
>> #ifndef _ASM_GENERIC__TLB_H
>> #define _ASM_GENERIC__TLB_H
>>
>> +#include <linux/pagemap.h>
>> #include <linux/swap.h>
>> #include <asm/pgalloc.h>
>> #include <asm/tlbflush.h>
>
> The patch is not the correct fix since the actual problem comes from
> free_pages_and_swap_cache() in swap.h
>
> Patch is below, but it has not yet gotten enough testing that I'm 100%
> confident it doesn't break anything else...

There is a comment about sparc and linux/pagemap.h in linux/swap.h.
Adrian, do you cross-compile for sparc? If this issue is fixed, the
comment should probably go away and your patch is fine.

Otherwise, declaring page_cache_release() and release_pages() just above
these macros is perhaps the safer approach?

I agree that asm-generic/tlb.h should not include linux/swap.h.

Hannes

2008-07-26 18:08:11

by Adrian Bunk

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, Jul 26, 2008 at 07:59:08PM +0200, Johannes Weiner wrote:
> Hi,
>
> Adrian Bunk <[email protected]> writes:
>
> > On Sat, Jul 26, 2008 at 07:18:05PM +0200, Haavard Skinnemoen wrote:
> >> This fixes the following compile error on avr32, introduced by
> >> commit ba92a43dbaee339cf5915ef766d3d3ffbaaf103c
> >> (exec: remove some includes):
> >>
> >> In file included from include/asm/tlb.h:24,
> >> from fs/exec.c:55:
> >> include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> >> include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
> >> include/asm-generic/tlb.h: In function 'tlb_remove_page':
> >> include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
> >> make[1]: *** [fs/exec.o] Error 1
> >>
> >> Signed-off-by: Haavard Skinnemoen <[email protected]>
> >> ---
> >> include/asm-generic/tlb.h | 1 +
> >> 1 files changed, 1 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
> >> index f490e43..f85f3a2 100644
> >> --- a/include/asm-generic/tlb.h
> >> +++ b/include/asm-generic/tlb.h
> >> @@ -13,6 +13,7 @@
> >> #ifndef _ASM_GENERIC__TLB_H
> >> #define _ASM_GENERIC__TLB_H
> >>
> >> +#include <linux/pagemap.h>
> >> #include <linux/swap.h>
> >> #include <asm/pgalloc.h>
> >> #include <asm/tlbflush.h>
> >
> > The patch is not the correct fix since the actual problem comes from
> > free_pages_and_swap_cache() in swap.h
> >
> > Patch is below, but it has not yet gotten enough testing that I'm 100%
> > confident it doesn't break anything else...
>
> There is a comment about sparc and linux/pagemap.h in linux/swap.h.

Damn, this trap strikes again.

So Haavard's patch is actually the best available solution.

> Adrian, do you cross-compile for sparc?
>...

Sure, I wouldn't touch generic headers without testing whether it
breaks any defconfig.

I knew why I was saying "Patch is below, but it has not yet gotten
enough testing that I'm 100% confident it doesn't break anything
else..." - I was simply not yet through with the compilations.

> Hannes

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2008-07-26 18:14:29

by Hugh Dickins

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, 26 Jul 2008, Adrian Bunk wrote:
> On Sat, Jul 26, 2008 at 07:18:05PM +0200, Haavard Skinnemoen wrote:
> > This fixes the following compile error on avr32, introduced by
> > commit ba92a43dbaee339cf5915ef766d3d3ffbaaf103c
> > (exec: remove some includes):
> >
> > In file included from include/asm/tlb.h:24,
> > from fs/exec.c:55:
> > include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
> > include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
> > make[1]: *** [fs/exec.o] Error 1
> >
> > Signed-off-by: Haavard Skinnemoen <[email protected]>
> > ---
> > include/asm-generic/tlb.h | 1 +
> > 1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
> > index f490e43..f85f3a2 100644
> > --- a/include/asm-generic/tlb.h
> > +++ b/include/asm-generic/tlb.h
> > @@ -13,6 +13,7 @@
> > #ifndef _ASM_GENERIC__TLB_H
> > #define _ASM_GENERIC__TLB_H
> >
> > +#include <linux/pagemap.h>
> > #include <linux/swap.h>
> > #include <asm/pgalloc.h>
> > #include <asm/tlbflush.h>
>
> The patch is not the correct fix since the actual problem comes from
> free_pages_and_swap_cache() in swap.h

You're right, but ...

>
> Patch is below, but it has not yet gotten enough testing that I'm 100%
> confident it doesn't break anything else...

... according to the comment in swap.h, we have to expect that
yours (just like Yoichi-san's) will cause some problem on sparc.

I quite like Haavard's, since almost all the arch tlb.hs seem to
have noticed a similar issue and already include pagemap.h. But
if we do go with his, it looks to me like include/asm-s390/tlb.h
would also need the same.

My preference for now is just to go with the fs/exec.c fixup at
the bottom, restoring things more how they were before I came
along and screwed everyone over. Adrian, may I impertinently
ask you to give that one a go in your build farm?

The _right_ fix looks to me to be different from all of these, but
something we shouldn't get into while people are waiting for their
kernel builds to be fixed: probably not for 2.6.27.

That right fix, I think, would be to move free_page_and_swap_cache
and free_pages_and_swap_cache (and free_swap_cache) from mm/swap_state.c
to mm/swap.c, and move their prototype declarations from linux/swap.h to
asm*/tlb.h, and hopefully remove swap.h and pagemap.h from asm*/tlb.h.
But that could cause a lot more trouble than I have done already!

Hugh

>
> cu
> Adrian
>
>
> <-- snip -->
>
>
> This patch fixes the following build error:
>
> <-- snip -->
>
> ...
> CC fs/exec.o
> In file included from include2/asm/tlb.h:24,
> from /home/bunk/linux/kernel-2.6/git/linux-2.6/fs/exec.c:55:
> /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
> /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_remove_page':
> /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
> make[2]: *** [fs/exec.o] Error 1
>
> <-- snip -->
>
> Signed-off-by: Adrian Bunk <[email protected]>
>
> ---
> 2dab88e59c7ec942df29bbdee041e54edeee1d25
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 0b33776..f835058 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -7,6 +7,7 @@
> #include <linux/list.h>
> #include <linux/memcontrol.h>
> #include <linux/sched.h>
> +#include <linux/pagemap.h>
>
> #include <asm/atomic.h>
> #include <asm/page.h>

--- 2.6.26-git/fs/exec.c 2008-07-26 12:33:28.000000000 +0100
+++ linux/fs/exec.c 2008-07-26 18:50:38.000000000 +0100
@@ -32,6 +32,7 @@
#include <linux/swap.h>
#include <linux/string.h>
#include <linux/init.h>
+#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/spinlock.h>
#include <linux/key.h>

2008-07-26 18:31:16

by Haavard Skinnemoen

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, 26 Jul 2008 20:38:32 +0300
Adrian Bunk <[email protected]> wrote:

> The patch is not the correct fix since the actual problem comes from
> free_pages_and_swap_cache() in swap.h

True, but I saw this comment in swap.h:

/* only sparc can not include linux/pagemap.h in this file
* so leave page_cache_release and release_pages undeclared... */

so I thought it might be safer to add the include to tlb.h instead.

Haavard

2008-07-26 19:50:53

by Andrew Morton

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, 26 Jul 2008 19:13:43 +0100 (BST) Hugh Dickins <[email protected]> wrote:

> > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
> > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'

tlb_finish_mmu() inlines tlb_flush_mmu() and ends up being quite large.

tlb_finish_mmu() has five callsites in core kernel.

The above error is God's way of telling us that it's all too large to
be inlined.

uninlining these things would be a bit of a pita because of the various
arch overrides. But it really is the right thing to do.

2008-07-26 20:16:20

by Hugh Dickins

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, 26 Jul 2008, Andrew Morton wrote:
> On Sat, 26 Jul 2008 19:13:43 +0100 (BST) Hugh Dickins <[email protected]> wrote:
>
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
>
> tlb_finish_mmu() inlines tlb_flush_mmu() and ends up being quite large.
>
> tlb_finish_mmu() has five callsites in core kernel.
>
> The above error is God's way of telling us that it's all too large to
> be inlined.
>
> uninlining these things would be a bit of a pita because of the various
> arch overrides. But it really is the right thing to do.

Yes, that's a good point too. They could be put in arch/*/mm/somewhere.c.

But I'd rather put that off even further into the future, because there's
quite a bit of rationalization to be done (more arch differences than
necessary), and Ben's the one currently holding our reorganize-mmu_gather
ball. (I keep pointing to you, Ben, please don't think I'm accusing at
all: I'm the guilty one who held it and did nothing with it before.)

I'm still in favour the quick fs/exec.c build fixup for now.

Hugh

2008-07-26 20:26:35

by Andrew Morton

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, 26 Jul 2008 21:15:47 +0100 (BST) Hugh Dickins <[email protected]> wrote:

> On Sat, 26 Jul 2008, Andrew Morton wrote:
> > On Sat, 26 Jul 2008 19:13:43 +0100 (BST) Hugh Dickins <[email protected]> wrote:
> >
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h: In function 'tlb_remove_page':
> > > > /home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
> >
> > tlb_finish_mmu() inlines tlb_flush_mmu() and ends up being quite large.
> >
> > tlb_finish_mmu() has five callsites in core kernel.
> >
> > The above error is God's way of telling us that it's all too large to
> > be inlined.
> >
> > uninlining these things would be a bit of a pita because of the various
> > arch overrides. But it really is the right thing to do.
>
> Yes, that's a good point too. They could be put in arch/*/mm/somewhere.c.
>
> But I'd rather put that off even further into the future, because there's
> quite a bit of rationalization to be done (more arch differences than
> necessary), and Ben's the one currently holding our reorganize-mmu_gather
> ball. (I keep pointing to you, Ben, please don't think I'm accusing at
> all: I'm the guilty one who held it and did nothing with it before.)
>
> I'm still in favour the quick fs/exec.c build fixup for now.

Well, safe-simple-and-duck-the-issue has its merits. My inbox awaits thee :)

2008-07-26 20:38:16

by Hugh Dickins

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, 26 Jul 2008, Andrew Morton wrote:
> On Sat, 26 Jul 2008 21:15:47 +0100 (BST) Hugh Dickins <[email protected]> wrote:
> >
> > I'm still in favour the quick fs/exec.c build fixup for now.
>
> Well, safe-simple-and-duck-the-issue has its merits. My inbox awaits thee :)

I've trespassed on Adrian's good nature to ask him to run some builds
on it, having demonstrated my incompetence twice already. But he may
well have better things to do with his time. Hold on a mo, I'm just
wrapping up the tmpfs BUG first.

Hugh

2008-07-26 20:43:00

by Adrian Bunk

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, Jul 26, 2008 at 09:37:45PM +0100, Hugh Dickins wrote:
> On Sat, 26 Jul 2008, Andrew Morton wrote:
> > On Sat, 26 Jul 2008 21:15:47 +0100 (BST) Hugh Dickins <[email protected]> wrote:
> > >
> > > I'm still in favour the quick fs/exec.c build fixup for now.
> >
> > Well, safe-simple-and-duck-the-issue has its merits. My inbox awaits thee :)
>
> I've trespassed on Adrian's good nature to ask him to run some builds
> on it, having demonstrated my incompetence twice already. But he may
> well have better things to do with his time. Hold on a mo, I'm just
> wrapping up the tmpfs BUG first.

Sorry, if you wanted to know anything from me anything except whether my
patch is correct (as I already answered to Johannes it is not) I must
have missed it.

What exactly do you want me to test?

> Hugh

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2008-07-26 21:06:13

by Hugh Dickins

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, 26 Jul 2008, Adrian Bunk wrote:
> On Sat, Jul 26, 2008 at 09:37:45PM +0100, Hugh Dickins wrote:
> >
> > I've trespassed on Adrian's good nature to ask him to run some builds
> > on it, having demonstrated my incompetence twice already. But he may
> > well have better things to do with his time. Hold on a mo, I'm just
> > wrapping up the tmpfs BUG first.
>
> Sorry, if you wanted to know anything from me anything except whether my
> patch is correct (as I already answered to Johannes it is not) I must
> have missed it.
>
> What exactly do you want me to test?

It was this one, just including pagemap.h back in exec.c again:
not the best solution, but should be good for now. Please would
you give it the build testing you were giving yours? Or feel free
to point out that I'm wasting your and everybody's time, and just
call for a straight revert of ba92a43d, that'd be fine too.

Thanks,
Hugh

--- 2.6.26-git/fs/exec.c 2008-07-26 12:33:28.000000000 +0100
+++ linux/fs/exec.c 2008-07-26 18:50:38.000000000 +0100
@@ -32,6 +32,7 @@
#include <linux/swap.h>
#include <linux/string.h>
#include <linux/init.h>
+#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/spinlock.h>
#include <linux/key.h>

2008-07-27 13:04:56

by Adrian Bunk

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sat, Jul 26, 2008 at 10:05:34PM +0100, Hugh Dickins wrote:
> On Sat, 26 Jul 2008, Adrian Bunk wrote:
> > On Sat, Jul 26, 2008 at 09:37:45PM +0100, Hugh Dickins wrote:
> > >
> > > I've trespassed on Adrian's good nature to ask him to run some builds
> > > on it, having demonstrated my incompetence twice already. But he may
> > > well have better things to do with his time. Hold on a mo, I'm just
> > > wrapping up the tmpfs BUG first.
> >
> > Sorry, if you wanted to know anything from me anything except whether my
> > patch is correct (as I already answered to Johannes it is not) I must
> > have missed it.
> >
> > What exactly do you want me to test?
>
> It was this one, just including pagemap.h back in exec.c again:
> not the best solution, but should be good for now. Please would
> you give it the build testing you were giving yours? Or feel free
> to point out that I'm wasting your and everybody's time, and just
> call for a straight revert of ba92a43d, that'd be fine too.
>
> Thanks,
> Hugh
>
> --- 2.6.26-git/fs/exec.c 2008-07-26 12:33:28.000000000 +0100
> +++ linux/fs/exec.c 2008-07-26 18:50:38.000000000 +0100
> @@ -32,6 +32,7 @@
> #include <linux/swap.h>
> #include <linux/string.h>
> #include <linux/init.h>
> +#include <linux/pagemap.h>
> #include <linux/highmem.h>
> #include <linux/spinlock.h>
> #include <linux/key.h>

No problems found, patch works fine.

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

2008-07-27 13:41:29

by Hugh Dickins

[permalink] [raw]
Subject: Re: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>

On Sun, 27 Jul 2008, Adrian Bunk wrote:
> On Sat, Jul 26, 2008 at 10:05:34PM +0100, Hugh Dickins wrote:
> >
> > It was this one, just including pagemap.h back in exec.c again:
> > not the best solution, but should be good for now. Please would
> > you give it the build testing you were giving yours? Or feel free
> > to point out that I'm wasting your and everybody's time, and just
> > call for a straight revert of ba92a43d, that'd be fine too.
>
> No problems found, patch works fine.

Thanks a lot, Adrian: signed-off version follows with updated subject.

Hugh

2008-07-27 13:44:17

by Hugh Dickins

[permalink] [raw]
Subject: [PATCH] exec: include pagemap.h again to fix build

Fix compilation errors on avr32 and without CONFIG_SWAP, introduced by
ba92a43dbaee339cf5915ef766d3d3ffbaaf103c exec: remove some includes

In file included from include/asm/tlb.h:24,
from fs/exec.c:55:
include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
include/asm-generic/tlb.h: In function 'tlb_remove_page':
include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
make[1]: *** [fs/exec.o] Error 1

This straightforward part-revert is nobody's favourite patch to address
the underlying tlb.h needs swap.h needs pagemap.h (but sparc won't like
that) mess; but appropriate to fix the build now before any overhaul.

Reported-by: Yoichi Yuasa <[email protected]>
Reported-by: Haavard Skinnemoen <[email protected]>
Signed-off-by: Hugh Dickins <[email protected]>
Tested-by: Adrian Bunk <[email protected]>
---

fs/exec.c | 1 +
1 file changed, 1 insertion(+)

--- 2.6.26-git/fs/exec.c 2008-07-26 12:33:28.000000000 +0100
+++ linux/fs/exec.c 2008-07-26 18:50:38.000000000 +0100
@@ -32,6 +32,7 @@
#include <linux/swap.h>
#include <linux/string.h>
#include <linux/init.h>
+#include <linux/pagemap.h>
#include <linux/highmem.h>
#include <linux/spinlock.h>
#include <linux/key.h>