mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
l2tp: remove ->ref() and ->deref()
The ->ref() and ->deref() callbacks are unused since PPP stopped using
them in ee40fb2e1e ("l2tp: protect sock pointer of struct pppol2tp_session with RCU").
We can thus remove them from struct l2tp_session and drop the do_ref
parameter of l2tp_session_get*().
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
aa2bc739ef
commit
a4346210c4
@@ -143,7 +143,7 @@ static int l2tp_ip_recv(struct sk_buff *skb)
|
||||
}
|
||||
|
||||
/* Ok, this is a data packet. Lookup the session. */
|
||||
session = l2tp_session_get(net, NULL, session_id, true);
|
||||
session = l2tp_session_get(net, NULL, session_id);
|
||||
if (!session)
|
||||
goto discard;
|
||||
|
||||
@@ -205,8 +205,6 @@ pass_up:
|
||||
return sk_receive_skb(sk, skb, 1);
|
||||
|
||||
discard_sess:
|
||||
if (session->deref)
|
||||
session->deref(session);
|
||||
l2tp_session_dec_refcount(session);
|
||||
goto discard;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user