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) |
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) | |||
181 | return 0; | 181 | return 0; |
182 | } | 182 | } |
183 | 183 | ||
184 | #if IS_ENABLED(CONFIG_MIGRATION) | ||
184 | static int aio_migratepage(struct address_space *mapping, struct page *new, | 185 | static 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 | ||
212 | static const struct address_space_operations aio_ctx_aops = { | 214 | static 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 | ||
217 | static int aio_setup_ring(struct kioctx *ctx) | 221 | static int aio_setup_ring(struct kioctx *ctx) |