OSDN Git Service

net: minor cleanup in skb_ext_add()
authorPaolo Abeni <pabeni@redhat.com>
Fri, 21 Dec 2018 18:03:15 +0000 (19:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Dec 2018 18:24:54 +0000 (10:24 -0800)
commit682ec859518d73435cc924d816da2953343241c1
tree11fb43824d249c87afe417bef0b9c372077972b4
parentd312d0a6846a4553bd955afd414f8f55398ece07
net: minor cleanup in skb_ext_add()

When the extension to be added is already present, the only
skb field we may need to update is 'extensions': we can reorder
the code and avoid a branch.

v1 -> v2:
 - be sure to flag the newly added extension as active

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c