]> git.baikalelectronics.ru Git - kernel.git/commit
net: prepare (struct ubuf_info)->refcnt conversion
authorEric Dumazet <edumazet@google.com>
Thu, 31 Aug 2017 23:48:21 +0000 (16:48 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 2 Sep 2017 03:22:03 +0000 (20:22 -0700)
commitdf39e4d3fd3083baaf5c239a5e2f512c7ea78e6e
treeda0171aec6a48e32f1c9c140cf04e984cd979f5c
parentfbd3245fb7fec5c6d58ba72bbef25e4667c495a7
net: prepare (struct ubuf_info)->refcnt conversion

In order to convert this atomic_t refcnt to refcount_t,
we need to init the refcount to one to not trigger
a 0 -> 1 transition.

This also removes one atomic operation in fast path.

v2: removed dead code in sock_zerocopy_put_abort()
as suggested by Willem.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c
net/ipv4/tcp.c