Skip to content

Commit

Permalink
mm/pgtable-generic.c: fix CONFIG_SWAP=n build
Browse files Browse the repository at this point in the history
mips (and sparc32):

  In file included from arch/mips/include/asm/tlb.h:21,
                   from mm/pgtable-generic.c:9:
  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'

free_pages_and_swap_cache() and free_page_and_swap_cache() are macros
which call release_pages() and page_cache_release().  The obvious fix is
to include pagemap.h in swap.h, where those macros are defined.  But that
breaks sparc for weird reasons.

So fix it within mm/pgtable-generic.c instead.

Reported-by: Yoichi Yuasa <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Acked-by: Sam Ravnborg <[email protected]>
Cc: Sergei Shtylyov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Jan 26, 2011
1 parent cacf061 commit f95ba94
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mm/pgtable-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Copyright (C) 2010 Linus Torvalds
*/

#include <linux/pagemap.h>
#include <asm/tlb.h>
#include <asm-generic/pgtable.h>

Expand Down

0 comments on commit f95ba94

Please sign in to comment.