diff options
Diffstat (limited to 'net/sunrpc/xprt.c')
-rw-r--r-- | net/sunrpc/xprt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index e9ee7bf3a638..8cc5c8bcad7f 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -358,6 +358,11 @@ out_unlock: | |||
358 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task) | 358 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task) |
359 | { | 359 | { |
360 | if (xprt->snd_task == task) { | 360 | if (xprt->snd_task == task) { |
361 | if (task != NULL) { | ||
362 | struct rpc_rqst *req = task->tk_rqstp; | ||
363 | if (req != NULL) | ||
364 | req->rq_bytes_sent = 0; | ||
365 | } | ||
361 | xprt_clear_locked(xprt); | 366 | xprt_clear_locked(xprt); |
362 | __xprt_lock_write_next(xprt); | 367 | __xprt_lock_write_next(xprt); |
363 | } | 368 | } |
@@ -375,6 +380,11 @@ EXPORT_SYMBOL_GPL(xprt_release_xprt); | |||
375 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task) | 380 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task) |
376 | { | 381 | { |
377 | if (xprt->snd_task == task) { | 382 | if (xprt->snd_task == task) { |
383 | if (task != NULL) { | ||
384 | struct rpc_rqst *req = task->tk_rqstp; | ||
385 | if (req != NULL) | ||
386 | req->rq_bytes_sent = 0; | ||
387 | } | ||
378 | xprt_clear_locked(xprt); | 388 | xprt_clear_locked(xprt); |
379 | __xprt_lock_write_next_cong(xprt); | 389 | __xprt_lock_write_next_cong(xprt); |
380 | } | 390 | } |