]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
l2tp: improve tunnel/session refcount helpers
authorJames Chapman <jchapman@katalix.com>
Wed, 7 Aug 2024 06:54:50 +0000 (07:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Aug 2024 03:38:50 +0000 (04:38 +0100)
commitabe7a1a7d0b69e63b1bca5f9531023a52336784f
tree1d491c6b824af17f97ef97824f5f61c8126a351d
parent1f4c3dce9112d23145b4f8bbfd3793a1c4c517ab
l2tp: improve tunnel/session refcount helpers

l2tp_tunnel_inc_refcount and l2tp_session_inc_refcount wrap
refcount_inc. They add no value so just use the refcount APIs directly
and drop l2tp's helpers. l2tp already uses refcount_inc_not_zero
anyway.

Rename l2tp_tunnel_dec_refcount and l2tp_session_dec_refcount to
l2tp_tunnel_put and l2tp_session_put to better match their use pairing
various _get getters.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: Tom Parkin <tparkin@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/l2tp/l2tp_core.c
net/l2tp/l2tp_core.h
net/l2tp/l2tp_debugfs.c
net/l2tp/l2tp_eth.c
net/l2tp/l2tp_ip.c
net/l2tp/l2tp_ip6.c
net/l2tp/l2tp_netlink.c
net/l2tp/l2tp_ppp.c