Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a92bc88 authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: don't use migrate page without CONFIG_MIGRATION



Fixes compile error

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 163cf09c
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -712,8 +712,11 @@ static int btree_migratepage(struct address_space *mapping,
	if (page_has_private(page) &&
	if (page_has_private(page) &&
	    !try_to_release_page(page, GFP_KERNEL))
	    !try_to_release_page(page, GFP_KERNEL))
		return -EAGAIN;
		return -EAGAIN;

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


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


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