OSDN Git Service

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)
commit52016e259bab98613453e29d42f2ffe456feee11
treefc906ef696ccdd6b4f2783c22eabb581d04a2327
parentb2aecfe8e49059a69379a521aa68b4f55516780f
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