diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index e1e439ea177f..7f3a01a8cae7 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -1093,7 +1093,7 @@ EXPORT_SYMBOL_GPL(xprt_free); | |||
1093 | */ | 1093 | */ |
1094 | void xprt_reserve(struct rpc_task *task) | 1094 | void xprt_reserve(struct rpc_task *task) |
1095 | { | 1095 | { |
1096 | struct rpc_xprt *xprt = task->tk_xprt; | 1096 | struct rpc_xprt *xprt; |
1097 | 1097 | ||
1098 | task->tk_status = 0; | 1098 | task->tk_status = 0; |
1099 | if (task->tk_rqstp != NULL) | 1099 | if (task->tk_rqstp != NULL) |
@@ -1101,7 +1101,10 @@ void xprt_reserve(struct rpc_task *task) | |||
1101 | 1101 | ||
1102 | task->tk_timeout = 0; | 1102 | task->tk_timeout = 0; |
1103 | task->tk_status = -EAGAIN; | 1103 | task->tk_status = -EAGAIN; |
1104 | rcu_read_lock(); | ||
1105 | xprt = rcu_dereference(task->tk_client->cl_xprt); | ||
1104 | xprt->ops->alloc_slot(xprt, task); | 1106 | xprt->ops->alloc_slot(xprt, task); |
1107 | rcu_read_unlock(); | ||
1105 | } | 1108 | } |
1106 | 1109 | ||
1107 | static inline __be32 xprt_alloc_xid(struct rpc_xprt *xprt) | 1110 | static inline __be32 xprt_alloc_xid(struct rpc_xprt *xprt) |