* [PATCH] 2.5.5: compile error in fs/filesystems.c
@ 2002-02-28 23:49 Olaf Dietsche
2002-02-28 23:57 ` Neil Brown
0 siblings, 1 reply; 5+ messages in thread
From: Olaf Dietsche @ 2002-02-28 23:49 UTC (permalink / raw)
To: Neil Brown; +Cc: nfs-devel, linux-kernel
Hi Neil,
here is a patch to fix fs/filesystems.c, if you configure neither NFSD
nor NFSD_MODULE, but CONFIG_MODULES.
Regards, Olaf.
--- v2.5.5/fs/filesystems.c Thu Feb 28 22:41:18 2002
+++ linux/fs/filesystems.c Fri Mar 1 00:16:29 2002
@@ -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 */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] 2.5.5: compile error in fs/filesystems.c
2002-02-28 23:49 [PATCH] 2.5.5: compile error in fs/filesystems.c Olaf Dietsche
@ 2002-02-28 23:57 ` Neil Brown
2002-03-01 0:58 ` Olaf Dietsche
0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2002-02-28 23:57 UTC (permalink / raw)
To: Olaf Dietsche; +Cc: nfs-devel, linux-kernel
On Friday March 1, olaf.dietsche--list.linux-kernel@exmail.de wrote:
> Hi Neil,
>
> here is a patch to fix fs/filesystems.c, if you configure neither NFSD
> nor NFSD_MODULE, but CONFIG_MODULES.
Thanks.
2.5.6-pre2 already has a patch for this.
NeilBrown
>
> Regards, Olaf.
>
> --- v2.5.5/fs/filesystems.c Thu Feb 28 22:41:18 2002
> +++ linux/fs/filesystems.c Fri Mar 1 00:16:29 2002
> @@ -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 */
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] 2.5.5: compile error in fs/filesystems.c
2002-02-28 23:57 ` Neil Brown
@ 2002-03-01 0:58 ` Olaf Dietsche
2002-03-01 1:07 ` Neil Brown
0 siblings, 1 reply; 5+ messages in thread
From: Olaf Dietsche @ 2002-03-01 0:58 UTC (permalink / raw)
To: Neil Brown; +Cc: nfs-devel, linux-kernel
Hi Neil,
Neil Brown <neilb@cse.unsw.edu.au> writes:
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] 2.5.5: compile error in fs/filesystems.c
2002-03-01 0:58 ` Olaf Dietsche
@ 2002-03-01 1:07 ` Neil Brown
2002-03-01 7:48 ` Olaf Dietsche
0 siblings, 1 reply; 5+ messages in thread
From: Neil Brown @ 2002-03-01 1:07 UTC (permalink / raw)
To: Olaf Dietsche; +Cc: nfs-devel, linux-kernel
On Friday March 1, olaf.dietsche--list.linux-kernel@exmail.de wrote:
> Hi Neil,
>
> Neil Brown <neilb@cse.unsw.edu.au> writes:
>
> > 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:
With 2.5.6-pre2 you will always get just enough code to be able to
load nfsd as a module later, even if you didn't compile nfsd as a
module this time. Unless modules are disabled of course.
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
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?
NeilBrown
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] 2.5.5: compile error in fs/filesystems.c
2002-03-01 1:07 ` Neil Brown
@ 2002-03-01 7:48 ` Olaf Dietsche
0 siblings, 0 replies; 5+ messages in thread
From: Olaf Dietsche @ 2002-03-01 7:48 UTC (permalink / raw)
To: Neil Brown; +Cc: nfs-devel, linux-kernel
Hi Neil,
Neil Brown <neilb@cse.unsw.edu.au> writes:
> 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
>
> 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.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-03-01 7:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-28 23:49 [PATCH] 2.5.5: compile error in fs/filesystems.c Olaf Dietsche
2002-02-28 23:57 ` Neil Brown
2002-03-01 0:58 ` Olaf Dietsche
2002-03-01 1:07 ` Neil Brown
2002-03-01 7:48 ` Olaf Dietsche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®