aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
authorBenjamin LaHaise <bcrl@kvack.org>2013-07-17 09:34:24 -0400
committerBenjamin LaHaise <bcrl@kvack.org>2013-07-17 09:34:24 -0400
commit0c45355fc7c48c82db151bf0e7ca305d513e639e (patch)
tree9fcf956a6135b1120d206a9f7c250eb9cfbd6488 /fs/aio.c
parent36bc08cc01709b4a9bb563b35aa530241ddc63e3 (diff)
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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/aio.c b/fs/aio.c
index cbd0afe77273..dedeea01e4e4 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -181,6 +181,7 @@ static int aio_set_page_dirty(struct page *page)
181 return 0; 181 return 0;
182} 182}
183 183
184#if IS_ENABLED(CONFIG_MIGRATION)
184static int aio_migratepage(struct address_space *mapping, struct page *new, 185static int aio_migratepage(struct address_space *mapping, struct page *new,
185 struct page *old, enum migrate_mode mode) 186 struct page *old, enum migrate_mode mode)
186{ 187{
@@ -208,10 +209,13 @@ static int aio_migratepage(struct address_space *mapping, struct page *new,
208 209
209 return rc; 210 return rc;
210} 211}
212#endif
211 213
212static const struct address_space_operations aio_ctx_aops = { 214static const struct address_space_operations aio_ctx_aops = {
213 .set_page_dirty = aio_set_page_dirty, 215 .set_page_dirty = aio_set_page_dirty,
216#if IS_ENABLED(CONFIG_MIGRATION)
214 .migratepage = aio_migratepage, 217 .migratepage = aio_migratepage,
218#endif
215}; 219};
216 220
217static int aio_setup_ring(struct kioctx *ctx) 221static int aio_setup_ring(struct kioctx *ctx)