Skip to content

Commit

Permalink
Fix build error with !CONFIG_MIGRATION
Browse files Browse the repository at this point in the history
migrate_huge_page_move_mapping() is declared as "extern int ..."
in include/linux/migrate.h for !CONFIG_MIGRATION,
which causes the build error like below:

  mm/mprotect.o: In function `migrate_huge_page_move_mapping':
  mprotect.c:(.text+0x0): multiple definition of `migrate_huge_page_move_mapping'
  mm/shmem.o:shmem.c:(.text+0x0): first defined here
  mm/rmap.o: In function `migrate_huge_page_move_mapping':
  rmap.c:(.text+0x0): multiple definition of `migrate_huge_page_move_mapping'
  mm/shmem.o:shmem.c:(.text+0x0): first defined here

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
  • Loading branch information
Naoya Horiguchi authored and Andi Kleen committed Oct 8, 2010
1 parent d5bd910 commit 6f39ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/migrate.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static inline int migrate_vmas(struct mm_struct *mm,
static inline void migrate_page_copy(struct page *newpage,
struct page *page) {}

extern int migrate_huge_page_move_mapping(struct address_space *mapping,
static inline int migrate_huge_page_move_mapping(struct address_space *mapping,
struct page *newpage, struct page *page)
{
return -ENOSYS;
Expand Down

0 comments on commit 6f39ce0

Please sign in to comment.