lkml.org 
[lkml]   [2008]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [2.6 patch] linux/swap.h must #include <linux/pagemap.h>
    Date
    Hi,

    Adrian Bunk <bunk@kernel.org> 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 <haavard.skinnemoen@atmel.com>
    >> ---
    >> 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


    \
     
     \ /
      Last update: 2008-07-26 20:01    [W:0.021 / U:32.440 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site