Skip to content

Commit

Permalink
SUNRPC: Determine value of "nrprocs" automatically
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Dec 16, 2010
1 parent 4129ccf commit 1ac7c23
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions net/sunrpc/rpcb_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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
};

Expand Down

0 comments on commit 1ac7c23

Please sign in to comment.