Skip to content

Commit 02a7cb2

Browse files
q2vendavem330
authored andcommitted
udp: Remove redundant __udp_sysctl_init() call from udp_init().
__udp_sysctl_init() is called for init_net via udp_sysctl_ops. While at it, we can rename __udp_sysctl_init() to udp_sysctl_init(). Fixes: 1e80295 ("udp: Move the udp sysctl to namespace.") Signed-off-by: Kuniyuki Iwashima <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b7d8912 commit 02a7cb2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

net/ipv4/udp.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3264,19 +3264,15 @@ u32 udp_flow_hashrnd(void)
32643264
}
32653265
EXPORT_SYMBOL(udp_flow_hashrnd);
32663266

3267-
static void __udp_sysctl_init(struct net *net)
3267+
static int __net_init udp_sysctl_init(struct net *net)
32683268
{
32693269
net->ipv4.sysctl_udp_rmem_min = PAGE_SIZE;
32703270
net->ipv4.sysctl_udp_wmem_min = PAGE_SIZE;
32713271

32723272
#ifdef CONFIG_NET_L3_MASTER_DEV
32733273
net->ipv4.sysctl_udp_l3mdev_accept = 0;
32743274
#endif
3275-
}
32763275

3277-
static int __net_init udp_sysctl_init(struct net *net)
3278-
{
3279-
__udp_sysctl_init(net);
32803276
return 0;
32813277
}
32823278

@@ -3352,8 +3348,6 @@ void __init udp_init(void)
33523348
sysctl_udp_mem[1] = limit;
33533349
sysctl_udp_mem[2] = sysctl_udp_mem[0] * 2;
33543350

3355-
__udp_sysctl_init(&init_net);
3356-
33573351
/* 16 spinlocks per cpu */
33583352
udp_busylocks_log = ilog2(nr_cpu_ids) + 4;
33593353
udp_busylocks = kmalloc(sizeof(spinlock_t) << udp_busylocks_log,

0 commit comments

Comments
 (0)