diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-04-18 12:14:55 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-04-18 12:14:55 +0200 |
commit | 1111b680d34bc19190f02a1b4479c3fcc592c22e (patch) | |
tree | 9d45ad88b9354205a2d1fd76a338ab8693a16d86 /net/sctp/socket.c | |
parent | 37b6cb475a6d74bc047c53bc323d6eb3113e27a4 (diff) | |
parent | 24223657806a0ebd0ae5c9caaf7b021091889cf2 (diff) |
Merge branch 'perf/urgent' into perf/core, to pick up PMU driver fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index e13519e9df8..ff20e2dbbbc 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -2115,6 +2115,12 @@ static int sctp_recvmsg(struct kiocb *iocb, struct sock *sk, sctp_skb_pull(skb, copied); skb_queue_head(&sk->sk_receive_queue, skb); + /* When only partial message is copied to the user, increase + * rwnd by that amount. If all the data in the skb is read, + * rwnd is updated when the event is freed. + */ + if (!sctp_ulpevent_is_notification(event)) + sctp_assoc_rwnd_increase(event->asoc, copied); goto out; } else if ((event->msg_flags & MSG_NOTIFICATION) || (event->msg_flags & MSG_EOR)) |