2.5.5: compile error in fs/filesystems.c
PATCH 1/1 2.5.5: compile error in fs/filesystems.c
Hi Neil,
here is a patch to fix fs/filesystems.c, if you configure neither NFSD nor NFSD_MODULE, but CONFIG_MODULES.
Regards, Olaf.
fs/filesystems.c +4 -2
@@ -15,14 +15,17 @@#include <linux/linkage.h> #if ! defined(CONFIG_NFSD ) +#if defined(CONFIG_NFSD_MODULES )struct nfsd_linkage *nfsd_linkage; +EXPORT_SYMBOL (nfsd_linkage); +#endif long asmlinkage sys_nfsservctl (int cmd,void *argp,void *resp) {int ret = -ENOSYS ; -#if defined(CONFIG_MODULES ) +#if defined(CONFIG_NFSD_MODULES )lock_kernel (); if (nfsd_linkage ||
@@ -36,6 +39,5 @@#endif return ret; } -EXPORT_SYMBOL (nfsd_linkage);#endif /* CONFIG_NFSD */
Hi Neil,
Quoted 1 line · Neil Brown
2.5.6-pre2 already has a patch for this.
The compile error is gone, *but* ... :-)
With 2.5.6-pre2 you get nfsd support, wether you want it or not. Consider this:
#undef CONFIG_NFSD
#undef CONFIG_NFSD_MODULE
#define CONFIG_MODULES
Now, this part is compiled into the kernel, although you haven't requested it:
#if defined(CONFIG_MODULES)
lock_kernel();
if (nfsd_linkage ||
(request_module ("nfsd") == 0 && nfsd_linkage)) {
__MOD_INC_USE_COUNT(nfsd_linkage->owner);
unlock_kernel();
ret = nfsd_linkage->do_nfsservctl(cmd, argp, resp);
__MOD_DEC_USE_COUNT(nfsd_linkage->owner);
} else
unlock_kernel();#endif
Did I miss something?
Regards, Olaf.
Hi Neil,
Quoted 6 lines · Neil Brown
There have been a number of problem reports on linux-kernel over the last year or two from people who cannot load nfsd.o as a module. Often it is because they originally compiled without and NFSD support at all, but subsequently decided that wanted to compile and load nfsd.o
Quoted 7 lines
This works for many modules (e.g. filesystems) It is reasonable that it work for nfsd as well.
I thought that the cost of always including the hooks to load nfsd was minimal, and worth the consistency/convenience.
Does that seem reasonable to you?
Ok, I didn't think of that. Thanks for clarifying.
Regards, Olaf.