mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
net/tls: unref frags in order
It's generally more cache friendly to walk arrays in order, especially those which are likely not in cache. Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Dirk van der Merwe <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
fcd8c62709
commit
7ccd451912
1 changed files with 3 additions and 6 deletions
|
|
@ -122,13 +122,10 @@ static struct net_device *get_netdev_for_sock(struct sock *sk)
|
|||
|
||||
static void destroy_record(struct tls_record_info *record)
|
||||
{
|
||||
int nr_frags = record->num_frags;
|
||||
skb_frag_t *frag;
|
||||
int i;
|
||||
|
||||
while (nr_frags-- > 0) {
|
||||
frag = &record->frags[nr_frags];
|
||||
__skb_frag_unref(frag);
|
||||
}
|
||||
for (i = 0; i < record->num_frags; i++)
|
||||
__skb_frag_unref(&record->frags[i]);
|
||||
kfree(record);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue