summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust2013-01-08 15:10:21 +0100
committerTrond Myklebust2013-02-01 16:13:47 +0100
commita4f0835c604f80f945ab3e72ffd00547145c4b2b (patch)
treecd883841bad19e0ab7e7aa435bbcac572836ff9e /net/sunrpc/xprt.c
parentLinux 3.8-rc6 (diff)
downloadkernel-qcow2-linux-a4f0835c604f80f945ab3e72ffd00547145c4b2b.tar.gz
kernel-qcow2-linux-a4f0835c604f80f945ab3e72ffd00547145c4b2b.tar.xz
kernel-qcow2-linux-a4f0835c604f80f945ab3e72ffd00547145c4b2b.zip
SUNRPC: Eliminate task->tk_xprt accesses that bypass rcu_dereference()
tk_xprt is just a shortcut for tk_client->cl_xprt, however cl_xprt is defined as an __rcu variable. Replace dereferences of tk_xprt with non-rcu dereferences where it is safe to do so. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 33811db8788a..738ad59628cd 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -430,7 +430,9 @@ __xprt_put_cong(struct rpc_xprt *xprt, struct rpc_rqst *req)
*/
void xprt_release_rqst_cong(struct rpc_task *task)
{
- __xprt_put_cong(task->tk_xprt, task->tk_rqstp);
+ struct rpc_rqst *req = task->tk_rqstp;
+
+ __xprt_put_cong(req->rq_xprt, req);
}
EXPORT_SYMBOL_GPL(xprt_release_rqst_cong);