diff options
author | Xin Long <lucien.xin@gmail.com> | 2020-07-22 23:52:11 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-31 18:39:31 +0200 |
commit | 46e7c7efc30d97f47df4e814205e876a13f1999f (patch) | |
tree | 3e9cc87009aed7d4f3e18efc261633b98d27df37 /tools | |
parent | bbf6af4a938a4b6f139440e6d8cd8cb76379962d (diff) | |
download | linux-stable-46e7c7efc30d97f47df4e814205e876a13f1999f.tar.gz linux-stable-46e7c7efc30d97f47df4e814205e876a13f1999f.tar.bz2 linux-stable-46e7c7efc30d97f47df4e814205e876a13f1999f.zip |
sctp: shrink stream outq only when new outcnt < old outcnt
[ Upstream commit 8f13399db22f909a35735bf8ae2f932e0c8f0e30 ]
It's not necessary to go list_for_each for outq->out_chunk_list
when new outcnt >= old outcnt, as no chunk with higher sid than
new (outcnt - 1) exists in the outqueue.
While at it, also move the list_for_each code in a new function
sctp_stream_shrink_out(), which will be used in the next patch.
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions