]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/nfs/client.c
SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 1 Mar 2012 22:00:56 +0000 (17:00 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 2 Mar 2012 20:36:38 +0000 (15:36 -0500)
commit2446ab6070861aba2dd9229463ffbc40016a9f33
tree2e366c3236788936b9f4f58c0787ae01c265f4a4
parenta3ca5651cb5eebe2e56e510bbf5cd60abc301c9f
SUNRPC: Use RCU to dereference the rpc_clnt.cl_xprt field

A migration event will replace the rpc_xprt used by an rpc_clnt.  To
ensure this can be done safely, all references to cl_xprt must now use
a form of rcu_dereference().

Special care is taken with rpc_peeraddr2str(), which returns a pointer
to memory whose lifetime is the same as the rpc_xprt.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
[ cel: fix lockdep splats and layering violations ]
[ cel: forward ported to 3.4 ]
[ cel: remove rpc_max_reqs(), add rpc_net_ns() ]
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 files changed:
fs/nfs/callback_proc.c
fs/nfs/client.c
fs/nfs/nfs4namespace.c
fs/nfs/nfs4proc.c
fs/nfs/nfs4state.c
fs/nfs/super.c
include/linux/sunrpc/clnt.h
include/linux/sunrpc/debug.h
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/clnt.c
net/sunrpc/rpc_pipe.c
net/sunrpc/rpcb_clnt.c
net/sunrpc/stats.c