]> git.baikalelectronics.ru Git - kernel.git/commit
net: pskb_expand_head() optimization
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 2 Sep 2010 23:09:32 +0000 (23:09 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Sep 2010 01:24:59 +0000 (18:24 -0700)
commit4c4b6b5dc86e7e6c60020e3056993bdd616a867e
treeaac2e108e2c8c545669bd9fe655f04ac026f5e15
parent620f6cf6a079d8b2380672e7f6e0d8774bea39ff
net: pskb_expand_head() optimization

pskb_expand_head() blindly takes references on fragments before calling
skb_release_data(), potentially releasing these references.

We can add a fast path, avoiding these atomic operations, if we own the
last reference on skb->head.

Based on a previous patch from David

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c