Commit 865a7ecb authored by Peng Tao's avatar Peng Tao Committed by Trond Myklebust

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: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarPeng Tao <tao.peng@primarydata.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 97ba375b
...@@ -2252,6 +2252,7 @@ struct nfs4_threshold *pnfs_mdsthreshold_alloc(void) ...@@ -2252,6 +2252,7 @@ struct nfs4_threshold *pnfs_mdsthreshold_alloc(void)
return thp; return thp;
} }
#if IS_ENABLED(CONFIG_NFS_V4_2)
int int
pnfs_report_layoutstat(struct inode *inode) pnfs_report_layoutstat(struct inode *inode)
{ {
...@@ -2306,3 +2307,4 @@ pnfs_report_layoutstat(struct inode *inode) ...@@ -2306,3 +2307,4 @@ pnfs_report_layoutstat(struct inode *inode)
goto out; goto out;
} }
EXPORT_SYMBOL_GPL(pnfs_report_layoutstat); EXPORT_SYMBOL_GPL(pnfs_report_layoutstat);
#endif
...@@ -292,8 +292,6 @@ int pnfs_write_done_resend_to_mds(struct nfs_pgio_header *); ...@@ -292,8 +292,6 @@ int pnfs_write_done_resend_to_mds(struct nfs_pgio_header *);
struct nfs4_threshold *pnfs_mdsthreshold_alloc(void); struct nfs4_threshold *pnfs_mdsthreshold_alloc(void);
void pnfs_error_mark_layout_for_return(struct inode *inode, void pnfs_error_mark_layout_for_return(struct inode *inode,
struct pnfs_layout_segment *lseg); struct pnfs_layout_segment *lseg);
int pnfs_report_layoutstat(struct inode *inode);
/* nfs4_deviceid_flags */ /* nfs4_deviceid_flags */
enum { enum {
NFS_DEVICEID_INVALID = 0, /* set when MDS clientid recalled */ NFS_DEVICEID_INVALID = 0, /* set when MDS clientid recalled */
...@@ -692,4 +690,14 @@ static inline void nfs4_pnfs_v3_ds_connect_unload(void) ...@@ -692,4 +690,14 @@ static inline void nfs4_pnfs_v3_ds_connect_unload(void)
#endif /* CONFIG_NFS_V4_1 */ #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 */ #endif /* FS_NFS_PNFS_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment