Skip to content

Commit 1ad0013

Browse files
q2vendavem330
authored andcommitted
l2tp: Don't assign net->gen->ptr[] for pppol2tp_net_ops.
Commit fd558d1 ("l2tp: Split pppol2tp patch into separate l2tp and ppp parts") converted net->gen->ptr[pppol2tp_net_id] in l2tp_ppp.c to net->gen->ptr[l2tp_net_id] in l2tp_core.c. Now the leftover wastes one entry of net->gen->ptr[] in each netns. Let's avoid the unwanted allocation. Signed-off-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: James Chapman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c4b28e5 commit 1ad0013

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

net/l2tp/l2tp_ppp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,8 +1393,6 @@ static int pppol2tp_getsockopt(struct socket *sock, int level, int optname,
13931393
* L2TPv2, we dump only L2TPv2 tunnels and sessions here.
13941394
*****************************************************************************/
13951395

1396-
static unsigned int pppol2tp_net_id;
1397-
13981396
#ifdef CONFIG_PROC_FS
13991397

14001398
struct pppol2tp_seq_data {
@@ -1628,7 +1626,6 @@ static __net_exit void pppol2tp_exit_net(struct net *net)
16281626
static struct pernet_operations pppol2tp_net_ops = {
16291627
.init = pppol2tp_init_net,
16301628
.exit = pppol2tp_exit_net,
1631-
.id = &pppol2tp_net_id,
16321629
};
16331630

16341631
/*****************************************************************************

0 commit comments

Comments
 (0)