Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284636
b: refs/heads/master
c: 2fefb8a
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Dec 6, 2011
1 parent 8a6a2b9 commit 1b15ebf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7710ec36b6f516e026f9e29e50e67d2547c2a79b
refs/heads/master: 2fefb8a09e7ed251ae8996e0c69066e74c5aa560
2 changes: 1 addition & 1 deletion trunk/include/linux/sunrpc/svcsock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
7 changes: 1 addition & 6 deletions trunk/net/sunrpc/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
11 changes: 10 additions & 1 deletion trunk/net/sunrpc/svc_xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
*/
Expand Down

0 comments on commit 1b15ebf

Please sign in to comment.