aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2013-01-08 09:48:15 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-02-01 10:13:47 -0500
commit6a24dfb645dbcb05b34d08b991d082bdaa3ff072 (patch)
tree4d99948bb2bcb1170778bc668dc4d64e327e8175 /net/sunrpc/xprt.c
parent3dc0da278e2b26fa8e353b3a962b2c89e184d353 (diff)
SUNRPC: Pass pointers to struct rpc_xprt to the congestion window
Avoid access to task->tk_xprt Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r--net/sunrpc/xprt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index 774025109e2f..e1e439ea177f 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -438,15 +438,15 @@ EXPORT_SYMBOL_GPL(xprt_release_rqst_cong);
438 438
439/** 439/**
440 * xprt_adjust_cwnd - adjust transport congestion window 440 * xprt_adjust_cwnd - adjust transport congestion window
441 * @xprt: pointer to xprt
441 * @task: recently completed RPC request used to adjust window 442 * @task: recently completed RPC request used to adjust window
442 * @result: result code of completed RPC request 443 * @result: result code of completed RPC request
443 * 444 *
444 * We use a time-smoothed congestion estimator to avoid heavy oscillation. 445 * We use a time-smoothed congestion estimator to avoid heavy oscillation.
445 */ 446 */
446void xprt_adjust_cwnd(struct rpc_task *task, int result) 447void xprt_adjust_cwnd(struct rpc_xprt *xprt, struct rpc_task *task, int result)
447{ 448{
448 struct rpc_rqst *req = task->tk_rqstp; 449 struct rpc_rqst *req = task->tk_rqstp;
449 struct rpc_xprt *xprt = task->tk_xprt;
450 unsigned long cwnd = xprt->cwnd; 450 unsigned long cwnd = xprt->cwnd;
451 451
452 if (result >= 0 && cwnd <= xprt->cong) { 452 if (result >= 0 && cwnd <= xprt->cong) {
@@ -834,7 +834,7 @@ static void xprt_timer(struct rpc_task *task)
834 spin_lock_bh(&xprt->transport_lock); 834 spin_lock_bh(&xprt->transport_lock);
835 if (!req->rq_reply_bytes_recvd) { 835 if (!req->rq_reply_bytes_recvd) {
836 if (xprt->ops->timer) 836 if (xprt->ops->timer)
837 xprt->ops->timer(task); 837 xprt->ops->timer(xprt, task);
838 } else 838 } else
839 task->tk_status = 0; 839 task->tk_status = 0;
840 spin_unlock_bh(&xprt->transport_lock); 840 spin_unlock_bh(&xprt->transport_lock);