diff options
-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, |