]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
SUNRPC: Determine value of "nrprocs" automatically
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Dec 2010 14:59:09 +0000 (14:59 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 16 Dec 2010 17:37:25 +0000 (12:37 -0500)
Clean up.

Just fixed a panic where the nrprocs field in a different upper layer
client was set by hand incorrectly.  Use the compiler-generated method
used by the other upper layer protocols.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpcb_clnt.c

index d2a2ea090f9516a25d14570a8068284277f1a0ce..43838c72b7784168e5df73d8f2717865c7930e51 100644 (file)
@@ -57,10 +57,6 @@ enum {
        RPCBPROC_GETSTAT,
 };
 
-#define RPCB_HIGHPROC_2                RPCBPROC_CALLIT
-#define RPCB_HIGHPROC_3                RPCBPROC_TADDR2UADDR
-#define RPCB_HIGHPROC_4                RPCBPROC_GETSTAT
-
 /*
  * r_owner
  *
@@ -975,19 +971,19 @@ static struct rpcb_info rpcb_next_version6[] = {
 
 static struct rpc_version rpcb_version2 = {
        .number         = RPCBVERS_2,
-       .nrprocs        = RPCB_HIGHPROC_2,
+       .nrprocs        = ARRAY_SIZE(rpcb_procedures2),
        .procs          = rpcb_procedures2
 };
 
 static struct rpc_version rpcb_version3 = {
        .number         = RPCBVERS_3,
-       .nrprocs        = RPCB_HIGHPROC_3,
+       .nrprocs        = ARRAY_SIZE(rpcb_procedures3),
        .procs          = rpcb_procedures3
 };
 
 static struct rpc_version rpcb_version4 = {
        .number         = RPCBVERS_4,
-       .nrprocs        = RPCB_HIGHPROC_4,
+       .nrprocs        = ARRAY_SIZE(rpcb_procedures4),
        .procs          = rpcb_procedures4
 };