On Thu, Jan 27, 2022 at 01:22:31PM +0100, Richard Weinberger wrote: > Hi! > > while experimenting with various modifications in mountd to deal better with crossmounts > I noticed a problem in fs/nfsd/export.c svc_export_parse(), it always ignores the uuid > as provided by my mountd. > > If CONFIG_NFSD_V4 is not enabled, both fsloc_parse() and secinfo_parse() are a no-op. Ugh, yeah, that's totally wrong. The secinfo applies to v3 too, and in the fsloc case you still want to parse the stuff even if you're only going to ignore it. > So I'm not sure where to address the problem. Should we fix mountd or > change both fsloc_parse() and secinfo_parse() to consume all their > data even in the !CONFIG_NFSD_V4 case? Yeah, the latter. So, maybe the remove the ifdefs. (Should we remove CONFIG_NFSD_V4? I doubt v3-only kernels get much testing.) --b. diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 9421dae22737..9bdb5e102ba5 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -442,8 +442,6 @@ static int check_export(struct path *path, int *flags, unsigned char *uuid) } -#ifdef CONFIG_NFSD_V4 - static int fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc) { @@ -539,13 +537,6 @@ static int secinfo_parse(char **mesg, char *buf, struct svc_export *exp) return 0; } -#else /* CONFIG_NFSD_V4 */ -static inline int -fsloc_parse(char **mesg, char *buf, struct nfsd4_fs_locations *fsloc){return 0;} -static inline int -secinfo_parse(char **mesg, char *buf, struct svc_export *exp) { return 0; } -#endif - static inline int nfsd_uuid_parse(char **mesg, char *buf, unsigned char **puuid) {