nfs: cover ->migratepage with CONFIG_MIGRATION
authorChao Yu <yuchao0@huawei.com>
Tue, 20 Sep 2016 05:59:07 +0000 (13:59 +0800)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 20 Sep 2016 13:29:39 +0000 (09:29 -0400)
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.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/file.c
fs/nfs/internal.h

index ca699ddc11c10e2e012f200d37213c90739af286..580d1c588228d743f9e45049b92bb9197c5f61e8 100644 (file)
@@ -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,
index fd82bed39ed4b6a9334d1b289f8df9fb8a75e86a..4f0b2db8327f69c1c487cee2c1a7a99c62ec22e0 100644 (file)
@@ -535,12 +535,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