aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprt.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 13:16:28 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2005-06-22 16:07:31 -0400
commit0f9dc2b16884bb5957d010ed8e9114e771a05916 (patch)
tree538e71230ac6fb722eac40127326f56b87570bf7 /net/sunrpc/xprt.c
parent14b218a8e4f110206c46e586a3da372f665631e7 (diff)
[PATCH] RPC: Clean up socket autodisconnect
Cancel autodisconnect requests inside xprt_transmit() in order to avoid races. Use more efficient del_singleshot_timer_sync() 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, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index ef941e7de8bf..a74a1289113e 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -1240,6 +1240,8 @@ xprt_transmit(struct rpc_task *task)
1240 list_add_tail(&req->rq_list, &xprt->recv); 1240 list_add_tail(&req->rq_list, &xprt->recv);
1241 spin_unlock_bh(&xprt->sock_lock); 1241 spin_unlock_bh(&xprt->sock_lock);
1242 xprt_reset_majortimeo(req); 1242 xprt_reset_majortimeo(req);
1243 /* Turn off autodisconnect */
1244 del_singleshot_timer_sync(&xprt->timer);
1243 } 1245 }
1244 } else if (!req->rq_bytes_sent) 1246 } else if (!req->rq_bytes_sent)
1245 return; 1247 return;
@@ -1370,8 +1372,6 @@ xprt_reserve(struct rpc_task *task)
1370 spin_lock(&xprt->xprt_lock); 1372 spin_lock(&xprt->xprt_lock);
1371 do_xprt_reserve(task); 1373 do_xprt_reserve(task);
1372 spin_unlock(&xprt->xprt_lock); 1374 spin_unlock(&xprt->xprt_lock);
1373 if (task->tk_rqstp)
1374 del_timer_sync(&xprt->timer);
1375 } 1375 }
1376} 1376}
1377 1377