diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 19:16:28 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-06-22 22:07:31 +0200 |
commit | 0f9dc2b16884bb5957d010ed8e9114e771a05916 (patch) | |
tree | 538e71230ac6fb722eac40127326f56b87570bf7 /net/sunrpc | |
parent | [PATCH] RPC: Ensure rpc calls respects the RPC_NOINTR flag (diff) | |
download | linux-0f9dc2b16884bb5957d010ed8e9114e771a05916.tar.xz linux-0f9dc2b16884bb5957d010ed8e9114e771a05916.zip |
[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')
-rw-r--r-- | net/sunrpc/xprt.c | 4 |
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) list_add_tail(&req->rq_list, &xprt->recv); spin_unlock_bh(&xprt->sock_lock); xprt_reset_majortimeo(req); + /* Turn off autodisconnect */ + del_singleshot_timer_sync(&xprt->timer); } } else if (!req->rq_bytes_sent) return; @@ -1370,8 +1372,6 @@ xprt_reserve(struct rpc_task *task) spin_lock(&xprt->xprt_lock); do_xprt_reserve(task); spin_unlock(&xprt->xprt_lock); - if (task->tk_rqstp) - del_timer_sync(&xprt->timer); } } |