Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfsd4: fix v3-less build

Includes of pnfs.h in export.c and fcntl.c also bring in xdr4.h, which
won't build without CONFIG_NFSD_V3, breaking non-V3 builds. Ifdef-out
most of pnfs.h in that case.

Reported-by: Bas Peters <baspeters93@gmail.com>
Reported-by: Jim Davis <jim.epost@gmail.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Fixes: 9cf514ccfac "nfsd: implement pNFS operations"
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

+5
+5
fs/nfsd/pnfs.h
··· 1 1 #ifndef _FS_NFSD_PNFS_H 2 2 #define _FS_NFSD_PNFS_H 1 3 3 4 + #ifdef CONFIG_NFSD_V4 4 5 #include <linux/exportfs.h> 5 6 #include <linux/nfsd/export.h> 6 7 ··· 51 50 int nfsd4_set_deviceid(struct nfsd4_deviceid *id, const struct svc_fh *fhp, 52 51 u32 device_generation); 53 52 struct nfsd4_deviceid_map *nfsd4_find_devid_map(int idx); 53 + #endif /* CONFIG_NFSD_V4 */ 54 54 55 55 #ifdef CONFIG_NFSD_PNFS 56 56 void nfsd4_setup_layout_type(struct svc_export *exp); ··· 61 59 int nfsd4_init_pnfs(void); 62 60 void nfsd4_exit_pnfs(void); 63 61 #else 62 + struct nfs4_client; 63 + struct nfs4_file; 64 + 64 65 static inline void nfsd4_setup_layout_type(struct svc_export *exp) 65 66 { 66 67 }