SUNRPC: introduce helpers for reference counted rpcbind clients
authorStanislav Kinsbursky <skinsbursky@parallels.com>
Tue, 25 Oct 2011 11:16:36 +0000 (14:16 +0300)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 25 Oct 2011 11:15:48 +0000 (13:15 +0200)
commit914edb1bb2abe2ae4775368f2ffb7f41010fb81e
treec3a46e520de7e003c1a867dae4aa3740c4f074d2
parentdc6f55e9f8dac4b6479be67c5c9128ad37bb491f
SUNRPC: introduce helpers for reference counted rpcbind clients

v6:
1) added write memory barrier to rpcb_set_local to make sure, that rpcbind
clients become valid before rpcb_users assignment
2) explicitly set rpcb_users to 1 instead of incrementing it (looks clearer from
my pow).

v5: fixed races with rpcb_users in rpcb_get_local()

This helpers will be used for dynamical creation and destruction of rpcbind
clients.
Variable rpcb_users is actually a counter of lauched RPC services. If rpcbind
clients has been created already, then we just increase rpcb_users.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpcb_clnt.c