diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-12 19:20:04 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-12 19:20:04 -0400 |
commit | 1540c84b5ed657ed71dce06915bba461e6b09574 (patch) | |
tree | a449dc166800a1b0c429bb038bfc974e577eaf72 /net/sctp/socket.c | |
parent | 1a3a403aa98b0ccabeb12abd7da90d33250ea36b (diff) | |
parent | 4640b4e7d9919e9629fe8456df94f71658431ef9 (diff) |
Merge branch '2.6.33.4' into rt/2.6.33
Conflicts:
Makefile
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 9bd9d82a70c3..aa3ba60de54c 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -3718,12 +3718,12 @@ SCTP_STATIC int sctp_init_sock(struct sock *sk) | |||
3718 | sp->hmac = NULL; | 3718 | sp->hmac = NULL; |
3719 | 3719 | ||
3720 | SCTP_DBG_OBJCNT_INC(sock); | 3720 | SCTP_DBG_OBJCNT_INC(sock); |
3721 | percpu_counter_inc(&sctp_sockets_allocated); | ||
3722 | 3721 | ||
3723 | /* Set socket backlog limit. */ | 3722 | /* Set socket backlog limit. */ |
3724 | sk->sk_backlog.limit = sysctl_sctp_rmem[1]; | 3723 | sk->sk_backlog.limit = sysctl_sctp_rmem[1]; |
3725 | 3724 | ||
3726 | local_bh_disable(); | 3725 | local_bh_disable(); |
3726 | percpu_counter_inc(&sctp_sockets_allocated); | ||
3727 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); | 3727 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1); |
3728 | local_bh_enable(); | 3728 | local_bh_enable(); |
3729 | 3729 | ||
@@ -3740,8 +3740,8 @@ SCTP_STATIC void sctp_destroy_sock(struct sock *sk) | |||
3740 | /* Release our hold on the endpoint. */ | 3740 | /* Release our hold on the endpoint. */ |
3741 | ep = sctp_sk(sk)->ep; | 3741 | ep = sctp_sk(sk)->ep; |
3742 | sctp_endpoint_free(ep); | 3742 | sctp_endpoint_free(ep); |
3743 | percpu_counter_dec(&sctp_sockets_allocated); | ||
3744 | local_bh_disable(); | 3743 | local_bh_disable(); |
3744 | percpu_counter_dec(&sctp_sockets_allocated); | ||
3745 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); | 3745 | sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); |
3746 | local_bh_enable(); | 3746 | local_bh_enable(); |
3747 | } | 3747 | } |
@@ -6188,6 +6188,16 @@ do_nonblock: | |||
6188 | goto out; | 6188 | goto out; |
6189 | } | 6189 | } |
6190 | 6190 | ||
6191 | void sctp_data_ready(struct sock *sk, int len) | ||
6192 | { | ||
6193 | read_lock_bh(&sk->sk_callback_lock); | ||
6194 | if (sk_has_sleeper(sk)) | ||
6195 | wake_up_interruptible_sync_poll(sk->sk_sleep, POLLIN | | ||
6196 | POLLRDNORM | POLLRDBAND); | ||
6197 | sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); | ||
6198 | read_unlock_bh(&sk->sk_callback_lock); | ||
6199 | } | ||
6200 | |||
6191 | /* If socket sndbuf has changed, wake up all per association waiters. */ | 6201 | /* If socket sndbuf has changed, wake up all per association waiters. */ |
6192 | void sctp_write_space(struct sock *sk) | 6202 | void sctp_write_space(struct sock *sk) |
6193 | { | 6203 | { |