]> git.baikalelectronics.ru Git - kernel.git/commit
net: datagram: drop 'destructor' argument from several helpers
authorPaolo Abeni <pabeni@redhat.com>
Fri, 28 Feb 2020 13:45:22 +0000 (14:45 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Feb 2020 20:12:53 +0000 (12:12 -0800)
commit5116302bf770352ccd472852f7649ca0d1744808
tree9d8b2dd6c404c843212078fb52a8f38b75214afc
parent054b238c32fcf404cc97da154f351527416f84f4
net: datagram: drop 'destructor' argument from several helpers

The only users for such argument are the UDP protocol and the UNIX
socket family. We can safely reclaim the accounted memory directly
from the UDP code and, after the previous patch, we can do scm
stats accounting outside the datagram helpers.

Overall this cleans up a bit some datagram-related helpers, and
avoids an indirect call per packet in the UDP receive path.

v1 -> v2:
 - call scm_stat_del() only when not peeking - Kirill
 - fix build issue with CONFIG_INET_ESPINTCP

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/core/datagram.c
net/ipv4/udp.c
net/unix/af_unix.c
net/xfrm/espintcp.c