From 11eed19c42fbadb71b4a1dc491fd1d6c0bc71c51 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Tue, 8 Jan 2013 10:03:22 -0500 Subject: [PATCH] --- yaml --- r: 352961 b: refs/heads/master c: 45bc0dce9879505d6fd9ff68dcd0359fb260dfd7 h: refs/heads/master i: 352959: 1a4448f308908307c7f1540e44175aef373e649d v: v3 --- [refs] | 2 +- trunk/net/sunrpc/xprt.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 0ef3516e7e8c..d2bacec95924 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6a24dfb645dbcb05b34d08b991d082bdaa3ff072 +refs/heads/master: 45bc0dce9879505d6fd9ff68dcd0359fb260dfd7 diff --git a/trunk/net/sunrpc/xprt.c b/trunk/net/sunrpc/xprt.c index e1e439ea177f..7f3a01a8cae7 100644 --- a/trunk/net/sunrpc/xprt.c +++ b/trunk/net/sunrpc/xprt.c @@ -1093,7 +1093,7 @@ EXPORT_SYMBOL_GPL(xprt_free); */ void xprt_reserve(struct rpc_task *task) { - struct rpc_xprt *xprt = task->tk_xprt; + struct rpc_xprt *xprt; task->tk_status = 0; if (task->tk_rqstp != NULL) @@ -1101,7 +1101,10 @@ void xprt_reserve(struct rpc_task *task) task->tk_timeout = 0; task->tk_status = -EAGAIN; + rcu_read_lock(); + xprt = rcu_dereference(task->tk_client->cl_xprt); xprt->ops->alloc_slot(xprt, task); + rcu_read_unlock(); } static inline __be32 xprt_alloc_xid(struct rpc_xprt *xprt)