提交 2fefb8a0 编写于 作者: J J. Bruce Fields

svcrpc: destroy server sockets all at once

There's no reason I can see that we need to call sv_shutdown between
closing the two lists of sockets.

Cc: stable@kernel.org
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 7710ec36
......@@ -34,7 +34,7 @@ struct svc_sock {
/*
* Function prototypes.
*/
void svc_close_all(struct list_head *);
void svc_close_all(struct svc_serv *);
int svc_recv(struct svc_rqst *, long);
int svc_send(struct svc_rqst *);
void svc_drop(struct svc_rqst *);
......
......@@ -528,16 +528,11 @@ svc_destroy(struct svc_serv *serv)
del_timer_sync(&serv->sv_temptimer);
svc_close_all(&serv->sv_tempsocks);
svc_close_all(serv);
if (serv->sv_shutdown)
serv->sv_shutdown(serv);
svc_close_all(&serv->sv_permsocks);
BUG_ON(!list_empty(&serv->sv_permsocks));
BUG_ON(!list_empty(&serv->sv_tempsocks));
cache_clean_deferred(serv);
if (svc_serv_is_pooled(serv))
......
......@@ -929,7 +929,7 @@ void svc_close_xprt(struct svc_xprt *xprt)
}
EXPORT_SYMBOL_GPL(svc_close_xprt);
void svc_close_all(struct list_head *xprt_list)
static void svc_close_list(struct list_head *xprt_list)
{
struct svc_xprt *xprt;
struct svc_xprt *tmp;
......@@ -947,6 +947,15 @@ void svc_close_all(struct list_head *xprt_list)
}
}
void svc_close_all(struct svc_serv *serv)
{
svc_close_list(&serv->sv_tempsocks);
svc_close_list(&serv->sv_permsocks);
BUG_ON(!list_empty(&serv->sv_permsocks));
BUG_ON(!list_empty(&serv->sv_tempsocks));
}
/*
* Handle defer and revisit of requests
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册