[2.4 PATCH] NFS server as a module with -mregparm=3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



diff-tree b7844980a750ebe9f32ab5a29e370a4e32781e5d (from e8f3e8dd41308fb66c026f51bb86b23205ad48c1)
Author: Krzysztof Strasburger <[email protected]>
Date:   Wed Nov 2 10:43:36 2005 +0100

    [PATCH] NFS server as a module with -mregparm=3
    
    This patch makes it possible to compile the nfs server as a module, with
    -mregparm=3 (at least on x86).
    
    Such a combination did not work, as handle_sys_nfsservctl was called
    from the sys_nfsservctl function (in fs/filesystems.c) with parameters
    in registers, but tried to read them from the stack.
    
    Signed-off-by: Krzysztof Strasburger

diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 59d65f5..287bcad 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -212,8 +212,13 @@ static struct {
 };
 #define CMD_MAX (sizeof(sizes)/sizeof(sizes[0])-1)
 
+#ifdef MODULE
+long
+handle_sys_nfsservctl(int cmd, void *opaque_argp, void *opaque_resp)
+#else
 long
 asmlinkage handle_sys_nfsservctl(int cmd, void *opaque_argp, void *opaque_resp)
+#endif
 {
 	struct nfsctl_arg *	argp = opaque_argp;
 	union nfsctl_res *	resp = opaque_resp;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux