Skip to content

Commit

Permalink
Btrfs: don't use migrate page without CONFIG_MIGRATION
Browse files Browse the repository at this point in the history
Fixes compile error

Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
chrismason-xx committed Nov 29, 2010
1 parent 163cf09 commit 5a92bc8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,11 @@ static int btree_migratepage(struct address_space *mapping,
if (page_has_private(page) &&
!try_to_release_page(page, GFP_KERNEL))
return -EAGAIN;

#ifdef CONFIG_MIGRATION
return migrate_page(mapping, newpage, page);
#else
return -ENOSYS;
#endif
}

static int btree_writepage(struct page *page, struct writeback_control *wbc)
Expand Down Expand Up @@ -821,7 +824,9 @@ static const struct address_space_operations btree_aops = {
.releasepage = btree_releasepage,
.invalidatepage = btree_invalidatepage,
.sync_page = block_sync_page,
#ifdef CONFIG_MIGRATION
.migratepage = btree_migratepage,
#endif
};

int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize,
Expand Down

0 comments on commit 5a92bc8

Please sign in to comment.