File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,15 +103,10 @@ struct inet_frags {
103103int inet_frags_init (struct inet_frags * );
104104void inet_frags_fini (struct inet_frags * );
105105
106- static inline int inet_frags_init_net (struct netns_frags * nf )
106+ static inline void inet_frags_init_net (struct netns_frags * nf )
107107{
108108 atomic_set (& nf -> mem , 0 );
109- return 0 ;
110109}
111- static inline void inet_frags_uninit_net (struct netns_frags * nf )
112- {
113- }
114-
115110void inet_frags_exit_net (struct netns_frags * nf , struct inet_frags * f );
116111
117112void inet_frag_kill (struct inet_frag_queue * q , struct inet_frags * f );
Original file line number Diff line number Diff line change @@ -580,19 +580,14 @@ static int __net_init lowpan_frags_init_net(struct net *net)
580580{
581581 struct netns_ieee802154_lowpan * ieee802154_lowpan =
582582 net_ieee802154_lowpan (net );
583- int res ;
584583
585584 ieee802154_lowpan -> frags .high_thresh = IPV6_FRAG_HIGH_THRESH ;
586585 ieee802154_lowpan -> frags .low_thresh = IPV6_FRAG_LOW_THRESH ;
587586 ieee802154_lowpan -> frags .timeout = IPV6_FRAG_TIMEOUT ;
588587
589- res = inet_frags_init_net (& ieee802154_lowpan -> frags );
590- if (res )
591- return res ;
592- res = lowpan_frags_ns_sysctl_register (net );
593- if (res )
594- inet_frags_uninit_net (& ieee802154_lowpan -> frags );
595- return res ;
588+ inet_frags_init_net (& ieee802154_lowpan -> frags );
589+
590+ return lowpan_frags_ns_sysctl_register (net );
596591}
597592
598593static void __net_exit lowpan_frags_exit_net (struct net * net )
Original file line number Diff line number Diff line change @@ -840,8 +840,6 @@ static void __init ip4_frags_ctl_register(void)
840840
841841static int __net_init ipv4_frags_init_net (struct net * net )
842842{
843- int res ;
844-
845843 /* Fragment cache limits.
846844 *
847845 * The fragment memory accounting code, (tries to) account for
@@ -865,13 +863,9 @@ static int __net_init ipv4_frags_init_net(struct net *net)
865863 */
866864 net -> ipv4 .frags .timeout = IP_FRAG_TIME ;
867865
868- res = inet_frags_init_net (& net -> ipv4 .frags );
869- if (res )
870- return res ;
871- res = ip4_frags_ns_ctl_register (net );
872- if (res )
873- inet_frags_uninit_net (& net -> ipv4 .frags );
874- return res ;
866+ inet_frags_init_net (& net -> ipv4 .frags );
867+
868+ return ip4_frags_ns_ctl_register (net );
875869}
876870
877871static void __net_exit ipv4_frags_exit_net (struct net * net )
Original file line number Diff line number Diff line change @@ -649,18 +649,12 @@ EXPORT_SYMBOL_GPL(nf_ct_frag6_consume_orig);
649649
650650static int nf_ct_net_init (struct net * net )
651651{
652- int res ;
653-
654652 net -> nf_frag .frags .high_thresh = IPV6_FRAG_HIGH_THRESH ;
655653 net -> nf_frag .frags .low_thresh = IPV6_FRAG_LOW_THRESH ;
656654 net -> nf_frag .frags .timeout = IPV6_FRAG_TIMEOUT ;
657- res = inet_frags_init_net (& net -> nf_frag .frags );
658- if (res )
659- return res ;
660- res = nf_ct_frag6_sysctl_register (net );
661- if (res )
662- inet_frags_uninit_net (& net -> nf_frag .frags );
663- return res ;
655+ inet_frags_init_net (& net -> nf_frag .frags );
656+
657+ return nf_ct_frag6_sysctl_register (net );
664658}
665659
666660static void nf_ct_net_exit (struct net * net )
Original file line number Diff line number Diff line change @@ -708,19 +708,13 @@ static void ip6_frags_sysctl_unregister(void)
708708
709709static int __net_init ipv6_frags_init_net (struct net * net )
710710{
711- int res ;
712-
713711 net -> ipv6 .frags .high_thresh = IPV6_FRAG_HIGH_THRESH ;
714712 net -> ipv6 .frags .low_thresh = IPV6_FRAG_LOW_THRESH ;
715713 net -> ipv6 .frags .timeout = IPV6_FRAG_TIMEOUT ;
716714
717- res = inet_frags_init_net (& net -> ipv6 .frags );
718- if (res )
719- return res ;
720- res = ip6_frags_ns_sysctl_register (net );
721- if (res )
722- inet_frags_uninit_net (& net -> ipv6 .frags );
723- return res ;
715+ inet_frags_init_net (& net -> ipv6 .frags );
716+
717+ return ip6_frags_ns_sysctl_register (net );
724718}
725719
726720static void __net_exit ipv6_frags_exit_net (struct net * net )
You can’t perform that action at this time.
0 commit comments