diff mbox

nfs: cover ->migratepage with CONFIG_MIGRATION

Message ID 20160920040125.18895-1-yuchao0@huawei.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chao Yu Sept. 20, 2016, 4:01 a.m. UTC
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>
---
 fs/nfs/file.c     | 2 ++
 fs/nfs/internal.h | 8 --------
 2 files changed, 2 insertions(+), 8 deletions(-)

Comments

Chao Yu Sept. 20, 2016, 5:51 a.m. UTC | #1
On 2016/9/20 20:51, kbuild test robot wrote:
>>> fs/nfs/file.c:547:17: error: 'nfs_migrate_page' undeclared here (not in a function)
>      .migratepage = nfs_migrate_page,

Oops :(, sorry for my mistake, let me fix this.

Thanks,

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
kernel test robot Sept. 20, 2016, 12:51 p.m. UTC | #2
Hi Chao,

[auto build test ERROR on nfs/linux-next]
[also build test ERROR on v4.8-rc7 next-20160919]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Chao-Yu/nfs-cover-migratepage-with-CONFIG_MIGRATION/20160920-121006
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: i386-randconfig-s1-09191616 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

>> fs/nfs/file.c:547:17: error: 'nfs_migrate_page' undeclared here (not in a function)
     .migratepage = nfs_migrate_page,
                    ^~~~~~~~~~~~~~~~

vim +/nfs_migrate_page +547 fs/nfs/file.c

4899f9c8 Nick Piggin     2007-10-16  541  	.write_begin = nfs_write_begin,
4899f9c8 Nick Piggin     2007-10-16  542  	.write_end = nfs_write_end,
cd52ed35 Trond Myklebust 2006-03-20  543  	.invalidatepage = nfs_invalidate_page,
cd52ed35 Trond Myklebust 2006-03-20  544  	.releasepage = nfs_release_page,
^1da177e Linus Torvalds  2005-04-16  545  	.direct_IO = nfs_direct_IO,
daa42d9f Chao Yu         2016-09-20  546  #ifdef CONFIG_MIGRATION
074cc1de Trond Myklebust 2009-08-10 @547  	.migratepage = nfs_migrate_page,
daa42d9f Chao Yu         2016-09-20  548  #endif
e3db7691 Trond Myklebust 2007-01-10  549  	.launder_page = nfs_launder_page,
f919b196 Mel Gorman      2013-07-03  550  	.is_dirty_writeback = nfs_check_dirty_writeback,

:::::: The code at line 547 was first introduced by commit
:::::: 074cc1deec5dee63fcd5d966b36fa4f3765b50fc NFS: Add a ->migratepage() aop for NFS

:::::: TO: Trond Myklebust <Trond.Myklebust@netapp.com>
:::::: CC: Trond Myklebust <Trond.Myklebust@netapp.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 7d62097..6cfb83e 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -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,
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 7ce5e02..0d508f7 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -532,14 +532,6 @@  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
 nfs_write_verifier_cmp(const struct nfs_write_verifier *v1,
 		const struct nfs_write_verifier *v2)