diff options
author | Chris Mason <chris.mason@oracle.com> | 2010-11-29 09:49:11 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-11-29 09:49:11 -0500 |
commit | 5a92bc88cef279261d3f138e25850c122df67045 (patch) | |
tree | 22bc186bda2d2a61343bed473c3e606b43a49a18 | |
parent | 163cf09c2a0ee5cac6285f9347975bd1e97725da (diff) |
Btrfs: don't use migrate page without CONFIG_MIGRATION
Fixes compile error
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/disk-io.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 57c9d8eeb7dc..33b6d459494c 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -712,8 +712,11 @@ static int btree_migratepage(struct address_space *mapping, | |||
712 | if (page_has_private(page) && | 712 | if (page_has_private(page) && |
713 | !try_to_release_page(page, GFP_KERNEL)) | 713 | !try_to_release_page(page, GFP_KERNEL)) |
714 | return -EAGAIN; | 714 | return -EAGAIN; |
715 | 715 | #ifdef CONFIG_MIGRATION | |
716 | return migrate_page(mapping, newpage, page); | 716 | return migrate_page(mapping, newpage, page); |
717 | #else | ||
718 | return -ENOSYS; | ||
719 | #endif | ||
717 | } | 720 | } |
718 | 721 | ||
719 | static int btree_writepage(struct page *page, struct writeback_control *wbc) | 722 | static int btree_writepage(struct page *page, struct writeback_control *wbc) |
@@ -821,7 +824,9 @@ static const struct address_space_operations btree_aops = { | |||
821 | .releasepage = btree_releasepage, | 824 | .releasepage = btree_releasepage, |
822 | .invalidatepage = btree_invalidatepage, | 825 | .invalidatepage = btree_invalidatepage, |
823 | .sync_page = block_sync_page, | 826 | .sync_page = block_sync_page, |
827 | #ifdef CONFIG_MIGRATION | ||
824 | .migratepage = btree_migratepage, | 828 | .migratepage = btree_migratepage, |
829 | #endif | ||
825 | }; | 830 | }; |
826 | 831 | ||
827 | int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, | 832 | int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, |