]> 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)
commit5fa237aef51b83cdd3d2ab469b0d5e4b4266ef28
treefc906ef696ccdd6b4f2783c22eabb581d04a2327
parent076e325811bb9d352fbd13f33ab20ed527022427
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