Skip to contentSkip to conversation

nfs: cover ->migratepage with CONFIG_MIGRATION

PATCH New Chao Yu 1 participant 1 message Sep 20, 2016

Subsystems (2)
lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH v2 1/1 nfs: cover ->migratepage with CONFIG_MIGRATION

It will be more clean to use CONFIG_MIGRATION to cover nfs' private .migratepage in nfs_file_aops like we do in other part of nfs operations.

---
 fs/nfs/file.c     | 2 ++
 fs/nfs/internal.h | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)
fs/nfs/file.c +2 -0
index 7d62097..6cfb83e 100644
@@ -543,7 +543,9 @@ const struct address_space_operations nfs_file_aops = {
 	.invalidatepage = nfs_invalidate_page,
 	.releasepage = nfs_release_page,
 	.direct_IO = nfs_direct_IO,
+#ifdef CONFIG_MIGRATION
 	.migratepage = nfs_migrate_page,
+#endif
 	.launder_page = nfs_launder_page,
 	.is_dirty_writeback = nfs_check_dirty_writeback,
 	.error_remove_page = generic_error_remove_page,
fs/nfs/internal.h +0 -3
index 7ce5e02..2f1af3a 100644
@@ -532,12 +532,9 @@ void nfs_clear_pnfs_ds_commit_verifiers(struct pnfs_ds_commit_info *cinfo)
 }
 #endif
 
-
 #ifdef CONFIG_MIGRATION
 extern int nfs_migrate_page(struct address_space *,
 		struct page *, struct page *, enum migrate_mode);
-#else
-#define nfs_migrate_page NULL
 #endif
 
 static inline int
Signature · 1 line
2.8.2.311.gee88674