Skip to content

Commit

Permalink
l2tp: avoid duplicate l2tp_pernet() calls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guillaume Nault authored and David S. Miller committed Jun 26, 2018
1 parent d08532b commit 363a341
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/l2tp/l2tp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ int l2tp_session_register(struct l2tp_session *session,

if (tunnel->version == L2TP_HDR_VER_3) {
pn = l2tp_pernet(tunnel->l2tp_net);
g_head = l2tp_session_id_hash_2(l2tp_pernet(tunnel->l2tp_net),
session->session_id);
g_head = l2tp_session_id_hash_2(pn, session->session_id);

spin_lock_bh(&pn->l2tp_session_hlist_lock);

Expand Down

0 comments on commit 363a341

Please sign in to comment.