l2tp: avoid duplicate l2tp_pernet() calls
Replace 'l2tp_pernet(tunnel->l2tp_net)' with 'pn', which has been set on the preceding line. 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
d08532bb50
commit
363a341d19
@@ -322,8 +322,7 @@ int l2tp_session_register(struct l2tp_session *session,
|
|||||||
|
|
||||||
if (tunnel->version == L2TP_HDR_VER_3) {
|
if (tunnel->version == L2TP_HDR_VER_3) {
|
||||||
pn = l2tp_pernet(tunnel->l2tp_net);
|
pn = l2tp_pernet(tunnel->l2tp_net);
|
||||||
g_head = l2tp_session_id_hash_2(l2tp_pernet(tunnel->l2tp_net),
|
g_head = l2tp_session_id_hash_2(pn, session->session_id);
|
||||||
session->session_id);
|
|
||||||
|
|
||||||
spin_lock_bh(&pn->l2tp_session_hlist_lock);
|
spin_lock_bh(&pn->l2tp_session_hlist_lock);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user