Skip to content

Commit 79b9113

Browse files
wangweidongdavem330
authored andcommitted
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>
1 parent 940287e commit 79b9113

5 files changed

Lines changed: 26 additions & 28 deletions

File tree

‎include/net/sctp/sctp.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ extern struct kmem_cache *sctp_bucket_cachep __read_mostly;
171171
*/
172172

173173
/* spin lock wrappers. */
174-
#define sctp_local_bh_disable() local_bh_disable()
175-
#define sctp_local_bh_enable() local_bh_enable()
176174
#define sctp_spin_lock(lock) spin_lock(lock)
177175
#define sctp_spin_unlock(lock) spin_unlock(lock)
178176
#define sctp_write_lock(lock) write_lock(lock)

‎net/sctp/endpointola.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ struct sctp_association *sctp_endpoint_lookup_assoc(
368368
{
369369
struct sctp_association *asoc;
370370

371-
sctp_local_bh_disable();
371+
local_bh_disable();
372372
asoc = __sctp_endpoint_lookup_assoc(ep, paddr, transport);
373-
sctp_local_bh_enable();
373+
local_bh_enable();
374374

375375
return asoc;
376376
}

‎net/sctp/input.c‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,9 @@ static void __sctp_hash_endpoint(struct sctp_endpoint *ep)
726726
/* Add an endpoint to the hash. Local BH-safe. */
727727
void sctp_hash_endpoint(struct sctp_endpoint *ep)
728728
{
729-
sctp_local_bh_disable();
729+
local_bh_disable();
730730
__sctp_hash_endpoint(ep);
731-
sctp_local_bh_enable();
731+
local_bh_enable();
732732
}
733733

734734
/* Remove endpoint from the hash table. */
@@ -752,9 +752,9 @@ static void __sctp_unhash_endpoint(struct sctp_endpoint *ep)
752752
/* Remove endpoint from the hash. Local BH-safe. */
753753
void sctp_unhash_endpoint(struct sctp_endpoint *ep)
754754
{
755-
sctp_local_bh_disable();
755+
local_bh_disable();
756756
__sctp_unhash_endpoint(ep);
757-
sctp_local_bh_enable();
757+
local_bh_enable();
758758
}
759759

760760
/* Look up an endpoint. */
@@ -809,9 +809,9 @@ void sctp_hash_established(struct sctp_association *asoc)
809809
if (asoc->temp)
810810
return;
811811

812-
sctp_local_bh_disable();
812+
local_bh_disable();
813813
__sctp_hash_established(asoc);
814-
sctp_local_bh_enable();
814+
local_bh_enable();
815815
}
816816

817817
/* Remove association from the hash table. */
@@ -839,9 +839,9 @@ void sctp_unhash_established(struct sctp_association *asoc)
839839
if (asoc->temp)
840840
return;
841841

842-
sctp_local_bh_disable();
842+
local_bh_disable();
843843
__sctp_unhash_established(asoc);
844-
sctp_local_bh_enable();
844+
local_bh_enable();
845845
}
846846

847847
/* Look up an association. */
@@ -891,9 +891,9 @@ struct sctp_association *sctp_lookup_association(struct net *net,
891891
{
892892
struct sctp_association *asoc;
893893

894-
sctp_local_bh_disable();
894+
local_bh_disable();
895895
asoc = __sctp_lookup_association(net, laddr, paddr, transportp);
896-
sctp_local_bh_enable();
896+
local_bh_enable();
897897

898898
return asoc;
899899
}

‎net/sctp/proc.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
218218
return -ENOMEM;
219219

220220
head = &sctp_ep_hashtable[hash];
221-
sctp_local_bh_disable();
221+
local_bh_disable();
222222
read_lock(&head->lock);
223223
sctp_for_each_hentry(epb, &head->chain) {
224224
ep = sctp_ep(epb);
@@ -235,7 +235,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
235235
seq_printf(seq, "\n");
236236
}
237237
read_unlock(&head->lock);
238-
sctp_local_bh_enable();
238+
local_bh_enable();
239239

240240
return 0;
241241
}
@@ -326,7 +326,7 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
326326
return -ENOMEM;
327327

328328
head = &sctp_assoc_hashtable[hash];
329-
sctp_local_bh_disable();
329+
local_bh_disable();
330330
read_lock(&head->lock);
331331
sctp_for_each_hentry(epb, &head->chain) {
332332
assoc = sctp_assoc(epb);
@@ -362,7 +362,7 @@ static int sctp_assocs_seq_show(struct seq_file *seq, void *v)
362362
seq_printf(seq, "\n");
363363
}
364364
read_unlock(&head->lock);
365-
sctp_local_bh_enable();
365+
local_bh_enable();
366366

367367
return 0;
368368
}
@@ -446,7 +446,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
446446
return -ENOMEM;
447447

448448
head = &sctp_assoc_hashtable[hash];
449-
sctp_local_bh_disable();
449+
local_bh_disable();
450450
read_lock(&head->lock);
451451
rcu_read_lock();
452452
sctp_for_each_hentry(epb, &head->chain) {
@@ -505,7 +505,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
505505

506506
rcu_read_unlock();
507507
read_unlock(&head->lock);
508-
sctp_local_bh_enable();
508+
local_bh_enable();
509509

510510
return 0;
511511

‎net/sctp/socket.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ static void sctp_close(struct sock *sk, long timeout)
15101510
/* Supposedly, no process has access to the socket, but
15111511
* the net layers still may.
15121512
*/
1513-
sctp_local_bh_disable();
1513+
local_bh_disable();
15141514
sctp_bh_lock_sock(sk);
15151515

15161516
/* Hold the sock, since sk_common_release() will put sock_put()
@@ -1520,7 +1520,7 @@ static void sctp_close(struct sock *sk, long timeout)
15201520
sk_common_release(sk);
15211521

15221522
sctp_bh_unlock_sock(sk);
1523-
sctp_local_bh_enable();
1523+
local_bh_enable();
15241524

15251525
sock_put(sk);
15261526

@@ -5918,7 +5918,7 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
59185918

59195919
pr_debug("%s: begins, snum:%d\n", __func__, snum);
59205920

5921-
sctp_local_bh_disable();
5921+
local_bh_disable();
59225922

59235923
if (snum == 0) {
59245924
/* Search for an available port. */
@@ -6052,7 +6052,7 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)
60526052
sctp_spin_unlock(&head->lock);
60536053

60546054
fail:
6055-
sctp_local_bh_enable();
6055+
local_bh_enable();
60566056
return ret;
60576057
}
60586058

@@ -6297,9 +6297,9 @@ static inline void __sctp_put_port(struct sock *sk)
62976297

62986298
void sctp_put_port(struct sock *sk)
62996299
{
6300-
sctp_local_bh_disable();
6300+
local_bh_disable();
63016301
__sctp_put_port(sk);
6302-
sctp_local_bh_enable();
6302+
local_bh_enable();
63036303
}
63046304

63056305
/*
@@ -6950,14 +6950,14 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
69506950
/* Hook this new socket in to the bind_hash list. */
69516951
head = &sctp_port_hashtable[sctp_phashfn(sock_net(oldsk),
69526952
inet_sk(oldsk)->inet_num)];
6953-
sctp_local_bh_disable();
6953+
local_bh_disable();
69546954
sctp_spin_lock(&head->lock);
69556955
pp = sctp_sk(oldsk)->bind_hash;
69566956
sk_add_bind_node(newsk, &pp->owner);
69576957
sctp_sk(newsk)->bind_hash = pp;
69586958
inet_sk(newsk)->inet_num = inet_sk(oldsk)->inet_num;
69596959
sctp_spin_unlock(&head->lock);
6960-
sctp_local_bh_enable();
6960+
local_bh_enable();
69616961

69626962
/* Copy the bind_addr list from the original endpoint to the new
69636963
* endpoint so that we can handle restarts properly

0 commit comments

Comments
 (0)