aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorwangweidong <wangweidong1@huawei.com>2014-01-21 02:44:07 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-21 21:40:40 -0500
commit79b91130a2679ea5063d49c021d97346a09eb0a5 (patch)
treec529035c6a148ea9c407326f0ba5d29b9ab69e7d /net
parent940287ee10e270b78fbda6c44eaa1def5fde897d (diff)
sctp: remove macros sctp_local_bh_{disable|enable}
Redefined local_bh_{disable|enable} to sctp_local_bh_{disable|enable} for user space friendly code which we haven't use in years, so removing them. Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/endpointola.c4
-rw-r--r--net/sctp/input.c20
-rw-r--r--net/sctp/proc.c12
-rw-r--r--net/sctp/socket.c16
4 files changed, 26 insertions, 26 deletions
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index 6ffb6c1b13b7..8e5fdea05216 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -368,9 +368,9 @@ struct sctp_association *sctp_endpoint_lookup_assoc(
368{ 368{
369 struct sctp_association *asoc; 369 struct sctp_association *asoc;
370 370
371 sctp_local_bh_disable(); 371 local_bh_disable();
372 asoc = __sctp_endpoint_lookup_assoc(ep, paddr, transport); 372 asoc = __sctp_endpoint_lookup_assoc(ep, paddr, transport);
373 sctp_local_bh_enable(); 373 local_bh_enable();
374 374
375 return asoc; 375 return asoc;
376} 376}
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 1f4eeb43fbd6..e22b326b3540 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -726,9 +726,9 @@ static void __sctp_hash_endpoint(struct sctp_endpoint *ep)
726/* Add an endpoint to the hash. Local BH-safe. */ 726/* Add an endpoint to the hash. Local BH-safe. */
727void sctp_hash_endpoint(struct sctp_endpoint *ep) 727void sctp_hash_endpoint(struct sctp_endpoint *ep)
728{ 728{
729 sctp_local_bh_disable(); 729 local_bh_disable();
730 __sctp_hash_endpoint(ep); 730 __sctp_hash_endpoint(ep);
731 sctp_local_bh_enable(); 731 local_bh_enable();
732} 732}
733 733
734/* Remove endpoint from the hash table. */ 734/* Remove endpoint from the hash table. */
@@ -752,9 +752,9 @@ static void __sctp_unhash_endpoint(struct sctp_endpoint *ep)
752/* Remove endpoint from the hash. Local BH-safe. */ 752/* Remove endpoint from the hash. Local BH-safe. */
753void sctp_unhash_endpoint(struct sctp_endpoint *ep) 753void sctp_unhash_endpoint(struct sctp_endpoint *ep)
754{ 754{
755 sctp_local_bh_disable(); 755 local_bh_disable();
756 __sctp_unhash_endpoint(ep); 756 __sctp_unhash_endpoint(ep);
757 sctp_local_bh_enable(); 757 local_bh_enable();
758} 758}
759 759
760/* Look up an endpoint. */ 760/* Look up an endpoint. */
@@ -809,9 +809,9 @@ void sctp_hash_established(struct sctp_association *asoc)
809 if (asoc->temp) 809 if (asoc->temp)
810 return; 810 return;
811 811
812 sctp_local_bh_disable(); 812 local_bh_disable();
813 __sctp_hash_established(asoc); 813 __sctp_hash_established(asoc);
814 sctp_local_bh_enable(); 814 local_bh_enable();
815} 815}
816 816
817/* Remove association from the hash table. */ 817/* Remove association from the hash table. */
@@ -839,9 +839,9 @@ void sctp_unhash_established(struct sctp_association *asoc)
839 if (asoc->temp) 839 if (asoc->temp)
840 return; 840 return;
841 841
842 sctp_local_bh_disable(); 842 local_bh_disable();
843 __sctp_unhash_established(asoc); 843 __sctp_unhash_established(asoc);
844 sctp_local_bh_enable(); 844 local_bh_enable();
845} 845}
846 846
847/* Look up an association. */ 847/* Look up an association. */
@@ -891,9 +891,9 @@ struct sctp_association *sctp_lookup_association(struct net *net,
891{ 891{
892 struct sctp_association *asoc; 892 struct sctp_association *asoc;
893 893
894 sctp_local_bh_disable(); 894 local_bh_disable();
895 asoc = __sctp_lookup_association(net, laddr, paddr, transportp); 895 asoc = __sctp_lookup_association(net, laddr, paddr, transportp);
896 sctp_local_bh_enable(); 896 local_bh_enable();
897 897
898 return asoc; 898 return asoc;
899} 899}
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 63ba0bdc867a..0947f1e15eb8 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -218,7 +218,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
218 return -ENOMEM; 218 return -ENOMEM;
219 219
220 head = &sctp_ep_hashtable[hash]; 220 head = &sctp_ep_hashtable[hash];
221 sctp_local_bh_disable(); 221 local_bh_disable();
222 read_lock(&head->lock); 222 read_lock(&head->lock);
223 sctp_for_each_hentry(epb, &head->chain) { 223 sctp_for_each_hentry(epb, &head->chain) {
224 ep = sctp_ep(epb); 224 ep = sctp_ep(epb);
@@ -235,7 +235,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
235 seq_printf(seq, "\n"); 235 seq_printf(seq, "\n");
236 } 236 }
237 read_unlock(&head->lock); 237 read_unlock(&head->lock);
238 sctp_local_bh_enable(); 238 local_bh_enable();
239 239
240 return 0; 240 return 0;
241} 241}
@@ -326,7 +326,7 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
326 return -ENOMEM; 326 return -ENOMEM;
327 327
328 head = &sctp_assoc_hashtable[hash]; 328 head = &sctp_assoc_hashtable[hash];
329 sctp_local_bh_disable(); 329 local_bh_disable();
330 read_lock(&head->lock); 330 read_lock(&head->lock);
331 sctp_for_each_hentry(epb, &head->chain) { 331 sctp_for_each_hentry(epb, &head->chain) {
332 assoc = sctp_assoc(epb); 332 assoc = sctp_assoc(epb);
@@ -362,7 +362,7 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
362 seq_printf(seq, "\n"); 362 seq_printf(seq, "\n");
363 } 363 }
364 read_unlock(&head->lock); 364 read_unlock(&head->lock);
365 sctp_local_bh_enable(); 365 local_bh_enable();
366 366
367 return 0; 367 return 0;
368} 368}
@@ -446,7 +446,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
446 return -ENOMEM; 446 return -ENOMEM;
447 447
448 head = &sctp_assoc_hashtable[hash]; 448 head = &sctp_assoc_hashtable[hash];
449 sctp_local_bh_disable(); 449 local_bh_disable();
450 read_lock(&head->lock); 450 read_lock(&head->lock);
451 rcu_read_lock(); 451 rcu_read_lock();
452 sctp_for_each_hentry(epb, &head->chain) { 452 sctp_for_each_hentry(epb, &head->chain) {
@@ -505,7 +505,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
505 505
506 rcu_read_unlock(); 506 rcu_read_unlock();
507 read_unlock(&head->lock); 507 read_unlock(&head->lock);
508 sctp_local_bh_enable(); 508 local_bh_enable();
509 509
510 return 0; 510 return 0;
511 511
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index fd7337ad4c24..f2e00059efdb 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1510,7 +1510,7 @@ static void sctp_close(struct sock *sk, long timeout)
1510 /* Supposedly, no process has access to the socket, but 1510 /* Supposedly, no process has access to the socket, but
1511 * the net layers still may. 1511 * the net layers still may.
1512 */ 1512 */
1513 sctp_local_bh_disable(); 1513 local_bh_disable();
1514 sctp_bh_lock_sock(sk); 1514 sctp_bh_lock_sock(sk);
1515 1515
1516 /* Hold the sock, since sk_common_release() will put sock_put() 1516 /* Hold the sock, since sk_common_release() will put sock_put()
@@ -1520,7 +1520,7 @@ static void sctp_close(struct sock *sk, long timeout)
1520 sk_common_release(sk); 1520 sk_common_release(sk);
1521 1521
1522 sctp_bh_unlock_sock(sk); 1522 sctp_bh_unlock_sock(sk);
1523 sctp_local_bh_enable(); 1523 local_bh_enable();
1524 1524
1525 sock_put(sk); 1525 sock_put(sk);
1526 1526
@@ -5918,7 +5918,7 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
5918 5918
5919 pr_debug("%s: begins, snum:%d\n", __func__, snum); 5919 pr_debug("%s: begins, snum:%d\n", __func__, snum);
5920 5920
5921 sctp_local_bh_disable(); 5921 local_bh_disable();
5922 5922
5923 if (snum == 0) { 5923 if (snum == 0) {
5924 /* Search for an available port. */ 5924 /* Search for an available port. */
@@ -6052,7 +6052,7 @@ fail_unlock:
6052 sctp_spin_unlock(&head->lock); 6052 sctp_spin_unlock(&head->lock);
6053 6053
6054fail: 6054fail:
6055 sctp_local_bh_enable(); 6055 local_bh_enable();
6056 return ret; 6056 return ret;
6057} 6057}
6058 6058
@@ -6297,9 +6297,9 @@ static inline void __sctp_put_port(struct sock *sk)
6297 6297
6298void sctp_put_port(struct sock *sk) 6298void sctp_put_port(struct sock *sk)
6299{ 6299{
6300 sctp_local_bh_disable(); 6300 local_bh_disable();
6301 __sctp_put_port(sk); 6301 __sctp_put_port(sk);
6302 sctp_local_bh_enable(); 6302 local_bh_enable();
6303} 6303}
6304 6304
6305/* 6305/*
@@ -6950,14 +6950,14 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
6950 /* Hook this new socket in to the bind_hash list. */ 6950 /* Hook this new socket in to the bind_hash list. */
6951 head = &sctp_port_hashtable[sctp_phashfn(sock_net(oldsk), 6951 head = &sctp_port_hashtable[sctp_phashfn(sock_net(oldsk),
6952 inet_sk(oldsk)->inet_num)]; 6952 inet_sk(oldsk)->inet_num)];
6953 sctp_local_bh_disable(); 6953 local_bh_disable();
6954 sctp_spin_lock(&head->lock); 6954 sctp_spin_lock(&head->lock);
6955 pp = sctp_sk(oldsk)->bind_hash; 6955 pp = sctp_sk(oldsk)->bind_hash;
6956 sk_add_bind_node(newsk, &pp->owner); 6956 sk_add_bind_node(newsk, &pp->owner);
6957 sctp_sk(newsk)->bind_hash = pp; 6957 sctp_sk(newsk)->bind_hash = pp;
6958 inet_sk(newsk)->inet_num = inet_sk(oldsk)->inet_num; 6958 inet_sk(newsk)->inet_num = inet_sk(oldsk)->inet_num;
6959 sctp_spin_unlock(&head->lock); 6959 sctp_spin_unlock(&head->lock);
6960 sctp_local_bh_enable(); 6960 local_bh_enable();
6961 6961
6962 /* Copy the bind_addr list from the original endpoint to the new 6962 /* Copy the bind_addr list from the original endpoint to the new
6963 * endpoint so that we can handle restarts properly 6963 * endpoint so that we can handle restarts properly