Skip to content
Snippets Groups Projects
Commit 0f9dc2b1 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

[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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 14b218a8
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment