summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2015-06-25 18:19:32 +0800
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-06-26 14:01:37 -0400
commit865a7ecb2131a3ba26cc1d49daf18275375109f0 (patch)
tree67d77d73581a6529d787ec02efd8a6b86e692d54 /fs/nfs
parent97ba375b5df43790aa82c256f7f16ee8eb95c272 (diff)
downloadop-kernel-dev-865a7ecb2131a3ba26cc1d49daf18275375109f0.zip
op-kernel-dev-865a7ecb2131a3ba26cc1d49daf18275375109f0.tar.gz
nfs: provide pnfs_report_layoutstat when NFS42 is disabled
kbuild test robot reported: fs/built-in.o: In function `pnfs_report_layoutstat': >> (.text+0x151a1c): undefined reference to `nfs42_proc_layoutstats_generic' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/pnfs.c2
-rw-r--r--fs/nfs/pnfs.h12
2 files changed, 12 insertions, 2 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 5b52243..40baceb 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2252,6 +2252,7 @@ struct nfs4_threshold *pnfs_mdsthreshold_alloc(void)
return thp;
}
+#if IS_ENABLED(CONFIG_NFS_V4_2)
int
pnfs_report_layoutstat(struct inode *inode)
{
@@ -2306,3 +2307,4 @@ out_put:
goto out;
}
EXPORT_SYMBOL_GPL(pnfs_report_layoutstat);
+#endif
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 0a47239..3e6ab7b 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -292,8 +292,6 @@ int pnfs_write_done_resend_to_mds(struct nfs_pgio_header *);
struct nfs4_threshold *pnfs_mdsthreshold_alloc(void);
void pnfs_error_mark_layout_for_return(struct inode *inode,
struct pnfs_layout_segment *lseg);
-int pnfs_report_layoutstat(struct inode *inode);
-
/* nfs4_deviceid_flags */
enum {
NFS_DEVICEID_INVALID = 0, /* set when MDS clientid recalled */
@@ -692,4 +690,14 @@ static inline void nfs4_pnfs_v3_ds_connect_unload(void)
#endif /* CONFIG_NFS_V4_1 */
+#if IS_ENABLED(CONFIG_NFS_V4_2)
+int pnfs_report_layoutstat(struct inode *inode);
+#else
+static inline int
+pnfs_report_layoutstat(struct inode *inode)
+{
+ return 0;
+}
+#endif
+
#endif /* FS_NFS_PNFS_H */
OpenPOWER on IntegriCloud