diff options
author | Benjamin LaHaise <bcrl@kvack.org> | 2013-07-17 09:34:24 -0400 |
---|---|---|
committer | Benjamin LaHaise <bcrl@kvack.org> | 2013-07-17 09:34:24 -0400 |
commit | 0c45355fc7c48c82db151bf0e7ca305d513e639e (patch) | |
tree | 9fcf956a6135b1120d206a9f7c250eb9cfbd6488 /fs/aio.c | |
parent | 36bc08cc01709b4a9bb563b35aa530241ddc63e3 (diff) | |
download | linux-0c45355fc7c48c82db151bf0e7ca305d513e639e.tar.gz linux-0c45355fc7c48c82db151bf0e7ca305d513e639e.tar.bz2 linux-0c45355fc7c48c82db151bf0e7ca305d513e639e.zip |
aio: fix build when migration is disabled
When "fs/aio: Add support to aio ring pages migration" was applied, it
broke the build when CONFIG_MIGRATION was disabled. Wrap the migration
code with a test for CONFIG_MIGRATION to fix this and save a few bytes
when migration is disabled.
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -181,6 +181,7 @@ static int aio_set_page_dirty(struct page *page) return 0; } +#if IS_ENABLED(CONFIG_MIGRATION) static int aio_migratepage(struct address_space *mapping, struct page *new, struct page *old, enum migrate_mode mode) { @@ -208,10 +209,13 @@ static int aio_migratepage(struct address_space *mapping, struct page *new, return rc; } +#endif static const struct address_space_operations aio_ctx_aops = { .set_page_dirty = aio_set_page_dirty, +#if IS_ENABLED(CONFIG_MIGRATION) .migratepage = aio_migratepage, +#endif }; static int aio_setup_ring(struct kioctx *ctx) |