diff options
author | wangweidong <wangweidong1@huawei.com> | 2014-01-21 02:44:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-21 21:40:41 -0500 |
commit | 3c8e43ba9fe93b2670decc119f82f072a8d2459f (patch) | |
tree | 187011eb548ea89b4d56d036030b8318a5566853 /net/sctp | |
parent | 79b91130a2679ea5063d49c021d97346a09eb0a5 (diff) |
sctp: remove macros sctp_spin_[un]lock
Redefined spin_[un]lock to sctp_spin_[un]lock 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/sctp')
-rw-r--r-- | net/sctp/socket.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index f2e00059efdb..98532cbd842e 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -5937,14 +5937,14 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr) | |||
5937 | continue; | 5937 | continue; |
5938 | index = sctp_phashfn(sock_net(sk), rover); | 5938 | index = sctp_phashfn(sock_net(sk), rover); |
5939 | head = &sctp_port_hashtable[index]; | 5939 | head = &sctp_port_hashtable[index]; |
5940 | sctp_spin_lock(&head->lock); | 5940 | spin_lock(&head->lock); |
5941 | sctp_for_each_hentry(pp, &head->chain) | 5941 | sctp_for_each_hentry(pp, &head->chain) |
5942 | if ((pp->port == rover) && | 5942 | if ((pp->port == rover) && |
5943 | net_eq(sock_net(sk), pp->net)) | 5943 | net_eq(sock_net(sk), pp->net)) |
5944 | goto next; | 5944 | goto next; |
5945 | break; | 5945 | break; |
5946 | next: | 5946 | next: |
5947 | sctp_spin_unlock(&head->lock); | 5947 | spin_unlock(&head->lock); |
5948 | } while (--remaining > 0); | 5948 | } while (--remaining > 0); |
5949 | 5949 | ||
5950 | /* Exhausted local port range during search? */ | 5950 | /* Exhausted local port range during search? */ |
@@ -5965,7 +5965,7 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr) | |||
5965 | * port iterator, pp being NULL. | 5965 | * port iterator, pp being NULL. |
5966 | */ | 5966 | */ |
5967 | head = &sctp_port_hashtable[sctp_phashfn(sock_net(sk), snum)]; | 5967 | head = &sctp_port_hashtable[sctp_phashfn(sock_net(sk), snum)]; |
5968 | sctp_spin_lock(&head->lock); | 5968 | spin_lock(&head->lock); |
5969 | sctp_for_each_hentry(pp, &head->chain) { | 5969 | sctp_for_each_hentry(pp, &head->chain) { |
5970 | if ((pp->port == snum) && net_eq(pp->net, sock_net(sk))) | 5970 | if ((pp->port == snum) && net_eq(pp->net, sock_net(sk))) |
5971 | goto pp_found; | 5971 | goto pp_found; |
@@ -6049,7 +6049,7 @@ success: | |||
6049 | ret = 0; | 6049 | ret = 0; |
6050 | 6050 | ||
6051 | fail_unlock: | 6051 | fail_unlock: |
6052 | sctp_spin_unlock(&head->lock); | 6052 | spin_unlock(&head->lock); |
6053 | 6053 | ||
6054 | fail: | 6054 | fail: |
6055 | local_bh_enable(); | 6055 | local_bh_enable(); |
@@ -6286,13 +6286,13 @@ static inline void __sctp_put_port(struct sock *sk) | |||
6286 | inet_sk(sk)->inet_num)]; | 6286 | inet_sk(sk)->inet_num)]; |
6287 | struct sctp_bind_bucket *pp; | 6287 | struct sctp_bind_bucket *pp; |
6288 | 6288 | ||
6289 | sctp_spin_lock(&head->lock); | 6289 | spin_lock(&head->lock); |
6290 | pp = sctp_sk(sk)->bind_hash; | 6290 | pp = sctp_sk(sk)->bind_hash; |
6291 | __sk_del_bind_node(sk); | 6291 | __sk_del_bind_node(sk); |
6292 | sctp_sk(sk)->bind_hash = NULL; | 6292 | sctp_sk(sk)->bind_hash = NULL; |
6293 | inet_sk(sk)->inet_num = 0; | 6293 | inet_sk(sk)->inet_num = 0; |
6294 | sctp_bucket_destroy(pp); | 6294 | sctp_bucket_destroy(pp); |
6295 | sctp_spin_unlock(&head->lock); | 6295 | spin_unlock(&head->lock); |
6296 | } | 6296 | } |
6297 | 6297 | ||
6298 | void sctp_put_port(struct sock *sk) | 6298 | void sctp_put_port(struct sock *sk) |
@@ -6951,12 +6951,12 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, | |||
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 | local_bh_disable(); | 6953 | local_bh_disable(); |
6954 | sctp_spin_lock(&head->lock); | 6954 | 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 | spin_unlock(&head->lock); |
6960 | 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 |