]> git.baikalelectronics.ru Git - kernel.git/commit
l2tp: don't export tunnel and session free functions
authorTom Parkin <tparkin@katalix.com>
Tue, 28 Jul 2020 17:20:29 +0000 (18:20 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Jul 2020 23:45:31 +0000 (16:45 -0700)
commitd9b0ac738718265ee8af03ecb02a01dc5b889bbb
treefc906ef696ccdd6b4f2783c22eabb581d04a2327
parentfa8d32d0c66e01958dd1a4257e5f1289e9253a0b
l2tp: don't export tunnel and session free functions

Tunnel and session instances are reference counted, and shouldn't be
directly freed by pseudowire code.

Rather than exporting l2tp_tunnel_free and l2tp_session_free, make them
private to l2tp_core.c, and export the refcount functions instead.

In order to do this, the refcount functions cannot be declared as
inline.  Since the codepaths which take and drop tunnel and session
references are not directly in the datapath this shouldn't cause
performance issues.

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