summaryrefslogtreecommitdiffstats
path: root/net/l2tp
diff options
context:
space:
mode:
authorGuillaume Nault <g.nault@alphalink.fr>2018-06-25 16:07:24 +0200
committerDavid S. Miller <davem@davemloft.net>2018-06-26 22:55:51 +0900
commit363a341d190bde3f6d5f2786feefb9f1a7a45b95 (patch)
tree9987b1d74cff194240339f136b51e9b972d599cf /net/l2tp
parentd08532bb5080f234f1ac45f9fc909eb15f51834b (diff)
downloadlinux-363a341d190bde3f6d5f2786feefb9f1a7a45b95.tar.bz2
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>
Diffstat (limited to 'net/l2tp')
-rw-r--r--net/l2tp/l2tp_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index 96e31f2ae7cd..88c3001531b4 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -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);