diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch new file mode 100644 index 00000000..021a4682 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.2/0067-svcrpc-destroy-server-sockets-all-at-once.patch | |||
@@ -0,0 +1,85 @@ | |||
1 | From c132bb68434e1dcfc0e148d1e677f4433d6cf075 Mon Sep 17 00:00:00 2001 | ||
2 | From: "J. Bruce Fields" <bfields@redhat.com> | ||
3 | Date: Tue, 29 Nov 2011 11:35:35 -0500 | ||
4 | Subject: [PATCH 067/130] svcrpc: destroy server sockets all at once | ||
5 | |||
6 | commit 2fefb8a09e7ed251ae8996e0c69066e74c5aa560 upstream. | ||
7 | |||
8 | There's no reason I can see that we need to call sv_shutdown between | ||
9 | closing the two lists of sockets. | ||
10 | |||
11 | Signed-off-by: J. Bruce Fields <bfields@redhat.com> | ||
12 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | ||
13 | --- | ||
14 | include/linux/sunrpc/svcsock.h | 2 +- | ||
15 | net/sunrpc/svc.c | 7 +------ | ||
16 | net/sunrpc/svc_xprt.c | 11 ++++++++++- | ||
17 | 3 files changed, 12 insertions(+), 8 deletions(-) | ||
18 | |||
19 | diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h | ||
20 | index 85c50b4..c84e974 100644 | ||
21 | --- a/include/linux/sunrpc/svcsock.h | ||
22 | +++ b/include/linux/sunrpc/svcsock.h | ||
23 | @@ -34,7 +34,7 @@ struct svc_sock { | ||
24 | /* | ||
25 | * Function prototypes. | ||
26 | */ | ||
27 | -void svc_close_all(struct list_head *); | ||
28 | +void svc_close_all(struct svc_serv *); | ||
29 | int svc_recv(struct svc_rqst *, long); | ||
30 | int svc_send(struct svc_rqst *); | ||
31 | void svc_drop(struct svc_rqst *); | ||
32 | diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c | ||
33 | index 5443ffd..7ddfb04 100644 | ||
34 | --- a/net/sunrpc/svc.c | ||
35 | +++ b/net/sunrpc/svc.c | ||
36 | @@ -531,16 +531,11 @@ svc_destroy(struct svc_serv *serv) | ||
37 | |||
38 | del_timer_sync(&serv->sv_temptimer); | ||
39 | |||
40 | - svc_close_all(&serv->sv_tempsocks); | ||
41 | + svc_close_all(serv); | ||
42 | |||
43 | if (serv->sv_shutdown) | ||
44 | serv->sv_shutdown(serv); | ||
45 | |||
46 | - svc_close_all(&serv->sv_permsocks); | ||
47 | - | ||
48 | - BUG_ON(!list_empty(&serv->sv_permsocks)); | ||
49 | - BUG_ON(!list_empty(&serv->sv_tempsocks)); | ||
50 | - | ||
51 | cache_clean_deferred(serv); | ||
52 | |||
53 | if (svc_serv_is_pooled(serv)) | ||
54 | diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c | ||
55 | index 447cd0e..dcdc8df 100644 | ||
56 | --- a/net/sunrpc/svc_xprt.c | ||
57 | +++ b/net/sunrpc/svc_xprt.c | ||
58 | @@ -928,7 +928,7 @@ void svc_close_xprt(struct svc_xprt *xprt) | ||
59 | } | ||
60 | EXPORT_SYMBOL_GPL(svc_close_xprt); | ||
61 | |||
62 | -void svc_close_all(struct list_head *xprt_list) | ||
63 | +static void svc_close_list(struct list_head *xprt_list) | ||
64 | { | ||
65 | struct svc_xprt *xprt; | ||
66 | struct svc_xprt *tmp; | ||
67 | @@ -946,6 +946,15 @@ void svc_close_all(struct list_head *xprt_list) | ||
68 | } | ||
69 | } | ||
70 | |||
71 | +void svc_close_all(struct svc_serv *serv) | ||
72 | +{ | ||
73 | + svc_close_list(&serv->sv_tempsocks); | ||
74 | + svc_close_list(&serv->sv_permsocks); | ||
75 | + BUG_ON(!list_empty(&serv->sv_permsocks)); | ||
76 | + BUG_ON(!list_empty(&serv->sv_tempsocks)); | ||
77 | + | ||
78 | +} | ||
79 | + | ||
80 | /* | ||
81 | * Handle defer and revisit of requests | ||
82 | */ | ||
83 | -- | ||
84 | 1.7.7.4 | ||
85 | |||