diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-03-21 01:35:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-03-21 01:35:41 -0500 |
commit | 57b47a53ec4a67691ba32cff5768e8d78fa6c67f (patch) | |
tree | d735ae4734f7b386eefa508a0629715f45808d1d /net/ipv4/ipvs | |
parent | 6613f82dd293b23f582a649b287fadbf8d23e6cf (diff) |
[NET]: sem2mutex part 2
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipvs')
-rw-r--r-- | net/ipv4/ipvs/ip_vs_app.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/ipv4/ipvs/ip_vs_app.c b/net/ipv4/ipvs/ip_vs_app.c index 9b176a942ac5..e7752334d296 100644 --- a/net/ipv4/ipvs/ip_vs_app.c +++ b/net/ipv4/ipvs/ip_vs_app.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/stat.h> | 31 | #include <linux/stat.h> |
32 | #include <linux/proc_fs.h> | 32 | #include <linux/proc_fs.h> |
33 | #include <linux/seq_file.h> | 33 | #include <linux/seq_file.h> |
34 | #include <linux/mutex.h> | ||
34 | 35 | ||
35 | #include <net/ip_vs.h> | 36 | #include <net/ip_vs.h> |
36 | 37 | ||
@@ -40,7 +41,7 @@ EXPORT_SYMBOL(register_ip_vs_app_inc); | |||
40 | 41 | ||
41 | /* ipvs application list head */ | 42 | /* ipvs application list head */ |
42 | static LIST_HEAD(ip_vs_app_list); | 43 | static LIST_HEAD(ip_vs_app_list); |
43 | static DECLARE_MUTEX(__ip_vs_app_mutex); | 44 | static DEFINE_MUTEX(__ip_vs_app_mutex); |
44 | 45 | ||
45 | 46 | ||
46 | /* | 47 | /* |
@@ -173,11 +174,11 @@ register_ip_vs_app_inc(struct ip_vs_app *app, __u16 proto, __u16 port) | |||
173 | { | 174 | { |
174 | int result; | 175 | int result; |
175 | 176 | ||
176 | down(&__ip_vs_app_mutex); | 177 | mutex_lock(&__ip_vs_app_mutex); |
177 | 178 | ||
178 | result = ip_vs_app_inc_new(app, proto, port); | 179 | result = ip_vs_app_inc_new(app, proto, port); |
179 | 180 | ||
180 | up(&__ip_vs_app_mutex); | 181 | mutex_unlock(&__ip_vs_app_mutex); |
181 | 182 | ||
182 | return result; | 183 | return result; |
183 | } | 184 | } |
@@ -191,11 +192,11 @@ int register_ip_vs_app(struct ip_vs_app *app) | |||
191 | /* increase the module use count */ | 192 | /* increase the module use count */ |
192 | ip_vs_use_count_inc(); | 193 | ip_vs_use_count_inc(); |
193 | 194 | ||
194 | down(&__ip_vs_app_mutex); | 195 | mutex_lock(&__ip_vs_app_mutex); |
195 | 196 | ||
196 | list_add(&app->a_list, &ip_vs_app_list); | 197 | list_add(&app->a_list, &ip_vs_app_list); |
197 | 198 | ||
198 | up(&__ip_vs_app_mutex); | 199 | mutex_unlock(&__ip_vs_app_mutex); |
199 | 200 | ||
200 | return 0; | 201 | return 0; |
201 | } | 202 | } |
@@ -209,7 +210,7 @@ void unregister_ip_vs_app(struct ip_vs_app *app) | |||
209 | { | 210 | { |
210 | struct ip_vs_app *inc, *nxt; | 211 | struct ip_vs_app *inc, *nxt; |
211 | 212 | ||
212 | down(&__ip_vs_app_mutex); | 213 | mutex_lock(&__ip_vs_app_mutex); |
213 | 214 | ||
214 | list_for_each_entry_safe(inc, nxt, &app->incs_list, a_list) { | 215 | list_for_each_entry_safe(inc, nxt, &app->incs_list, a_list) { |
215 | ip_vs_app_inc_release(inc); | 216 | ip_vs_app_inc_release(inc); |
@@ -217,7 +218,7 @@ void unregister_ip_vs_app(struct ip_vs_app *app) | |||
217 | 218 | ||
218 | list_del(&app->a_list); | 219 | list_del(&app->a_list); |
219 | 220 | ||
220 | up(&__ip_vs_app_mutex); | 221 | mutex_unlock(&__ip_vs_app_mutex); |
221 | 222 | ||
222 | /* decrease the module use count */ | 223 | /* decrease the module use count */ |
223 | ip_vs_use_count_dec(); | 224 | ip_vs_use_count_dec(); |
@@ -498,7 +499,7 @@ static struct ip_vs_app *ip_vs_app_idx(loff_t pos) | |||
498 | 499 | ||
499 | static void *ip_vs_app_seq_start(struct seq_file *seq, loff_t *pos) | 500 | static void *ip_vs_app_seq_start(struct seq_file *seq, loff_t *pos) |
500 | { | 501 | { |
501 | down(&__ip_vs_app_mutex); | 502 | mutex_lock(&__ip_vs_app_mutex); |
502 | 503 | ||
503 | return *pos ? ip_vs_app_idx(*pos - 1) : SEQ_START_TOKEN; | 504 | return *pos ? ip_vs_app_idx(*pos - 1) : SEQ_START_TOKEN; |
504 | } | 505 | } |
@@ -530,7 +531,7 @@ static void *ip_vs_app_seq_next(struct seq_file *seq, void *v, loff_t *pos) | |||
530 | 531 | ||
531 | static void ip_vs_app_seq_stop(struct seq_file *seq, void *v) | 532 | static void ip_vs_app_seq_stop(struct seq_file *seq, void *v) |
532 | { | 533 | { |
533 | up(&__ip_vs_app_mutex); | 534 | mutex_unlock(&__ip_vs_app_mutex); |
534 | } | 535 | } |
535 | 536 | ||
536 | static int ip_vs_app_seq_show(struct seq_file *seq, void *v) | 537 | static int ip_vs_app_seq_show(struct seq_file *seq, void *v) |