summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorNicholas Mc Guire <hofrat@osadl.org>2016-03-13 11:48:24 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-16 19:20:50 -0400
commit489ce5f441e4094a3419d7e8e29fd756b7f391d4 (patch)
tree16d25b7c61cfbe75c973d18bdfe32851fa88a383 /net/sctp
parent1cdba550555561201398f6eb81c52d5bc511f1ad (diff)
downloadlinux-stable-489ce5f441e4094a3419d7e8e29fd756b7f391d4.tar.gz
linux-stable-489ce5f441e4094a3419d7e8e29fd756b7f391d4.tar.bz2
linux-stable-489ce5f441e4094a3419d7e8e29fd756b7f391d4.zip
sctp: consolidate local_bh_disable/enable + spin_lock/unlock to _bh variant
local_bh_disable() + spin_lock() is equivalent to spin_lock_bh(), same for the unlock/enable case, so replace the calls by the appropriate wrappers. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index b89501e5c1a1..f28ecf88cfea 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -7254,14 +7254,12 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
/* Hook this new socket in to the bind_hash list. */
head = &sctp_port_hashtable[sctp_phashfn(sock_net(oldsk),
inet_sk(oldsk)->inet_num)];
- local_bh_disable();
- spin_lock(&head->lock);
+ spin_lock_bh(&head->lock);
pp = sctp_sk(oldsk)->bind_hash;
sk_add_bind_node(newsk, &pp->owner);
sctp_sk(newsk)->bind_hash = pp;
inet_sk(newsk)->inet_num = inet_sk(oldsk)->inet_num;
- spin_unlock(&head->lock);
- local_bh_enable();
+ spin_unlock_bh(&head->lock);
/* Copy the bind_addr list from the original endpoint to the new
* endpoint so that we can handle restarts properly