diff options
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index ba81fe3ccab8..a2de585888d0 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -114,7 +114,7 @@ extern int sysctl_sctp_wmem[3]; | |||
114 | 114 | ||
115 | static int sctp_memory_pressure; | 115 | static int sctp_memory_pressure; |
116 | static atomic_t sctp_memory_allocated; | 116 | static atomic_t sctp_memory_allocated; |
117 | static atomic_t sctp_sockets_allocated; | 117 | struct percpu_counter sctp_sockets_allocated; |
118 | 118 | ||
119 | static void sctp_enter_memory_pressure(struct sock *sk) | 119 | static void sctp_enter_memory_pressure(struct sock *sk) |
120 | { | 120 | { |
@@ -3613,7 +3613,7 @@ SCTP_STATIC int sctp_init_sock(struct sock *sk) | |||
3613 | sp->hmac = NULL; | 3613 | sp->hmac = NULL; |
3614 | 3614 | ||
3615 | SCTP_DBG_OBJCNT_INC(sock); | 3615 | SCTP_DBG_OBJCNT_INC(sock); |
3616 | atomic_inc(&sctp_sockets_allocated); | 3616 | percpu_counter_inc(&sctp_sockets_allocated); |
3617 | 3617 | ||
3618 | local_bh_disable(); | 3618 | local_bh_disable(); |
3619 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); | 3619 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); |
@@ -3632,7 +3632,7 @@ SCTP_STATIC void sctp_destroy_sock(struct sock *sk) | |||
3632 | /* Release our hold on the endpoint. */ | 3632 | /* Release our hold on the endpoint. */ |
3633 | ep = sctp_sk(sk)->ep; | 3633 | ep = sctp_sk(sk)->ep; |
3634 | sctp_endpoint_free(ep); | 3634 | sctp_endpoint_free(ep); |
3635 | atomic_dec(&sctp_sockets_allocated); | 3635 | percpu_counter_dec(&sctp_sockets_allocated); |
3636 | local_bh_disable(); | 3636 | local_bh_disable(); |
3637 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); | 3637 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); |
3638 | local_bh_enable(); | 3638 | local_bh_enable(); |