Skip to content

Commit

Permalink
Merge branch 'pernet_operations-convert-part-3'
Browse files Browse the repository at this point in the history
Kirill Tkhai says:

====================
Converting pernet_operations (part #3)

This patchset continues to review and to convert pernet_operations
to async. Where it is possible, they are grouped by type of actions
init/exit methods ([1/28], for example). I hope this will make
the review a little bit easier. The changes are tree-wide: in net, fs,
drivers and security.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 27, 2018
2 parents 7f897db + 3edbccf commit 23363b8
Show file tree
Hide file tree
Showing 58 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/infiniband/core/cma.c
Original file line number Diff line number Diff line change
Expand Up @@ -4549,6 +4549,7 @@ static struct pernet_operations cma_pernet_operations = {
.exit = cma_exit_net,
.id = &cma_pernet_id,
.size = sizeof(struct cma_pernet),
.async = true,
};

static int __init cma_init(void)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4791,6 +4791,7 @@ static struct pernet_operations bond_net_ops = {
.exit = bond_net_exit,
.id = &bond_net_id,
.size = sizeof(struct bond_net),
.async = true,
};

static int __init bonding_init(void)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/geneve.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,7 @@ static struct pernet_operations geneve_net_ops = {
.exit_batch = geneve_exit_batch_net,
.id = &geneve_net_id,
.size = sizeof(struct geneve_net),
.async = true,
};

static int __init geneve_init_module(void)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/gtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,7 @@ static struct pernet_operations gtp_net_ops = {
.exit = gtp_net_exit,
.id = &gtp_net_id,
.size = sizeof(struct gtp_net),
.async = true,
};

static int __init gtp_init(void)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ipvlan/ipvlan_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ static struct pernet_operations ipvlan_net_ops = {
.id = &ipvlan_netid,
.size = sizeof(struct ipvlan_netns),
.exit = ipvlan_ns_exit,
.async = true,
};

static int __init ipvlan_init_module(void)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ppp/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ static struct pernet_operations ppp_net_ops = {
.exit = ppp_exit_net,
.id = &ppp_net_id,
.size = sizeof(struct ppp_net),
.async = true,
};

static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ppp/pppoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ static struct pernet_operations pppoe_net_ops = {
.exit = pppoe_exit_net,
.id = &pppoe_net_id,
.size = sizeof(struct pppoe_net),
.async = true,
};

static int __init pppoe_init(void)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/vrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,7 @@ static struct pernet_operations vrf_net_ops __net_initdata = {
.init = vrf_netns_init,
.id = &vrf_net_id,
.size = sizeof(bool),
.async = true,
};

static int __init vrf_init_module(void)
Expand Down
1 change: 1 addition & 0 deletions drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -3752,6 +3752,7 @@ static struct pernet_operations vxlan_net_ops = {
.exit_batch = vxlan_exit_batch_net,
.id = &vxlan_net_id,
.size = sizeof(struct vxlan_net),
.async = true,
};

static int __init vxlan_init_module(void)
Expand Down
1 change: 1 addition & 0 deletions fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ static struct pernet_operations lockd_net_ops = {
.exit = lockd_exit_net,
.id = &lockd_net_id,
.size = sizeof(struct lockd_net),
.async = true,
};


Expand Down
1 change: 1 addition & 0 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,7 @@ static struct pernet_operations nfs_net_ops = {
.exit = nfs_net_exit,
.id = &nfs_net_id,
.size = sizeof(struct nfs_net),
.async = true,
};

/*
Expand Down
1 change: 1 addition & 0 deletions fs/nfs_common/grace.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static struct pernet_operations grace_net_ops = {
.exit = grace_exit_net,
.id = &grace_net_id,
.size = sizeof(struct list_head),
.async = true,
};

static int __init
Expand Down
1 change: 1 addition & 0 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ static struct pernet_operations vlan_net_ops = {
.exit = vlan_exit_net,
.id = &vlan_net_id,
.size = sizeof(struct vlan_net),
.async = true,
};

static int __init vlan_proto_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/bridge/br.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ static void __net_exit br_net_exit(struct net *net)

static struct pernet_operations br_net_ops = {
.exit = br_net_exit,
.async = true,
};

static const struct stp_proto br_stp_proto = {
Expand Down
1 change: 1 addition & 0 deletions net/bridge/br_netfilter_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,7 @@ static struct pernet_operations brnf_net_ops __read_mostly = {
.exit = brnf_exit_net,
.id = &brnf_net_id,
.size = sizeof(struct brnf_net),
.async = true,
};

static struct notifier_block brnf_notifier __read_mostly = {
Expand Down
1 change: 1 addition & 0 deletions net/can/bcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1717,6 +1717,7 @@ static void canbcm_pernet_exit(struct net *net)
static struct pernet_operations canbcm_pernet_ops __read_mostly = {
.init = canbcm_pernet_init,
.exit = canbcm_pernet_exit,
.async = true,
};

static int __init bcm_module_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/ieee802154/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ static void __net_exit cfg802154_pernet_exit(struct net *net)

static struct pernet_operations cfg802154_pernet_ops = {
.exit = cfg802154_pernet_exit,
.async = true,
};

static int __init wpan_phy_class_init(void)
Expand Down
3 changes: 3 additions & 0 deletions net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,7 @@ static struct pernet_operations ipgre_net_ops = {
.exit_batch = ipgre_exit_batch_net,
.id = &ipgre_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};

static int ipgre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
Expand Down Expand Up @@ -1623,6 +1624,7 @@ static struct pernet_operations ipgre_tap_net_ops = {
.exit_batch = ipgre_tap_exit_batch_net,
.id = &gre_tap_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};

static int __net_init erspan_init_net(struct net *net)
Expand All @@ -1641,6 +1643,7 @@ static struct pernet_operations erspan_net_ops = {
.exit_batch = erspan_exit_batch_net,
.id = &erspan_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};

static int __init ipgre_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/ip_vti.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ static struct pernet_operations vti_net_ops = {
.exit_batch = vti_exit_batch_net,
.id = &vti_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};

static int vti_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ static struct pernet_operations ipip_net_ops = {
.exit_batch = ipip_exit_batch_net,
.id = &ipip_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};

static int __init ipip_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/netfilter/ipt_CLUSTERIP.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ static struct pernet_operations clusterip_net_ops = {
.exit = clusterip_net_exit,
.id = &clusterip_net_id,
.size = sizeof(struct clusterip_net),
.async = true,
};

static int __init clusterip_tg_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/netfilter/nf_defrag_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ static void __net_exit defrag4_net_exit(struct net *net)

static struct pernet_operations defrag4_net_ops = {
.exit = defrag4_net_exit,
.async = true,
};

static int __init nf_defrag_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/ila/ila_xlat.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,7 @@ static struct pernet_operations ila_net_ops = {
.exit = ila_exit_net,
.id = &ila_net_id,
.size = sizeof(struct ila_net),
.async = true,
};

static int ila_xlat_addr(struct sk_buff *skb, bool sir2ila)
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/ip6_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -1517,6 +1517,7 @@ static struct pernet_operations ip6gre_net_ops = {
.exit_batch = ip6gre_exit_batch_net,
.id = &ip6gre_net_id,
.size = sizeof(struct ip6gre_net),
.async = true,
};

static int ip6gre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2250,6 +2250,7 @@ static struct pernet_operations ip6_tnl_net_ops = {
.exit_batch = ip6_tnl_exit_batch_net,
.id = &ip6_tnl_net_id,
.size = sizeof(struct ip6_tnl_net),
.async = true,
};

/**
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/ip6_vti.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,7 @@ static struct pernet_operations vti6_net_ops = {
.exit_batch = vti6_exit_batch_net,
.id = &vti6_net_id,
.size = sizeof(struct vti6_net),
.async = true,
};

static struct xfrm6_protocol vti_esp6_protocol __read_mostly = {
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/netfilter/nf_defrag_ipv6_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ static void __net_exit defrag6_net_exit(struct net *net)

static struct pernet_operations defrag6_net_ops = {
.exit = defrag6_net_exit,
.async = true,
};

static int __init nf_defrag_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,7 @@ static struct pernet_operations sit_net_ops = {
.exit_batch = sit_exit_batch_net,
.id = &sit_net_id,
.size = sizeof(struct sit_net),
.async = true,
};

static void __exit sit_cleanup(void)
Expand Down
1 change: 1 addition & 0 deletions net/ipv6/xfrm6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ static struct pernet_operations xfrm6_tunnel_net_ops = {
.exit = xfrm6_tunnel_net_exit,
.id = &xfrm6_tunnel_net_id,
.size = sizeof(struct xfrm6_tunnel_net),
.async = true,
};

static int __init xfrm6_tunnel_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/kcm/kcmproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ static void kcm_proc_exit_net(struct net *net)
static struct pernet_operations kcm_net_ops = {
.init = kcm_proc_init_net,
.exit = kcm_proc_exit_net,
.async = true,
};

int __init kcm_proc_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/kcm/kcmsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,7 @@ static struct pernet_operations kcm_net_ops = {
.exit = kcm_exit_net,
.id = &kcm_net_id,
.size = sizeof(struct kcm_net),
.async = true,
};

static int __init kcm_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -3863,6 +3863,7 @@ static struct pernet_operations pfkey_net_ops = {
.exit = pfkey_net_exit,
.id = &pfkey_net_id,
.size = sizeof(struct netns_pfkey),
.async = true,
};

static void __exit ipsec_pfkey_exit(void)
Expand Down
1 change: 1 addition & 0 deletions net/l2tp/l2tp_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1770,6 +1770,7 @@ static struct pernet_operations pppol2tp_net_ops = {
.init = pppol2tp_init_net,
.exit = pppol2tp_exit_net,
.id = &pppol2tp_net_id,
.async = true,
};

/*****************************************************************************
Expand Down
1 change: 1 addition & 0 deletions net/netfilter/ipvs/ip_vs_lblc.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ static void __net_exit __ip_vs_lblc_exit(struct net *net) { }
static struct pernet_operations ip_vs_lblc_ops = {
.init = __ip_vs_lblc_init,
.exit = __ip_vs_lblc_exit,
.async = true,
};

static int __init ip_vs_lblc_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/netfilter/ipvs/ip_vs_lblcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ static void __net_exit __ip_vs_lblcr_exit(struct net *net) { }
static struct pernet_operations ip_vs_lblcr_ops = {
.init = __ip_vs_lblcr_init,
.exit = __ip_vs_lblcr_exit,
.async = true,
};

static int __init ip_vs_lblcr_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/netfilter/nf_synproxy_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ static struct pernet_operations synproxy_net_ops = {
.exit = synproxy_net_exit,
.id = &synproxy_net_id,
.size = sizeof(struct synproxy_net),
.async = true,
};

static int __init synproxy_core_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/netfilter/xt_hashlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,7 @@ static struct pernet_operations hashlimit_net_ops = {
.exit = hashlimit_net_exit,
.id = &hashlimit_net_id,
.size = sizeof(struct hashlimit_net),
.async = true,
};

static int __init hashlimit_mt_init(void)
Expand Down
1 change: 1 addition & 0 deletions net/netfilter/xt_recent.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ static struct pernet_operations recent_net_ops = {
.exit = recent_net_exit,
.id = &recent_net_id,
.size = sizeof(struct recent_net),
.async = true,
};

static struct xt_match recent_mt_reg[] __read_mostly = {
Expand Down
1 change: 1 addition & 0 deletions net/phonet/pn_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ static struct pernet_operations phonet_net_ops = {
.exit = phonet_exit_net,
.id = &phonet_net_id,
.size = sizeof(struct phonet_net),
.async = true,
};

/* Initialize Phonet devices list */
Expand Down
1 change: 1 addition & 0 deletions net/sched/act_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ static struct pernet_operations bpf_net_ops = {
.exit_batch = bpf_exit_net,
.id = &bpf_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

static int __init bpf_init_module(void)
Expand Down
1 change: 1 addition & 0 deletions net/sched/act_connmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ static struct pernet_operations connmark_net_ops = {
.exit_batch = connmark_exit_net,
.id = &connmark_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

static int __init connmark_init_module(void)
Expand Down
1 change: 1 addition & 0 deletions net/sched/act_csum.c
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ static struct pernet_operations csum_net_ops = {
.exit_batch = csum_exit_net,
.id = &csum_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

MODULE_DESCRIPTION("Checksum updating actions");
Expand Down
1 change: 1 addition & 0 deletions net/sched/act_gact.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ static struct pernet_operations gact_net_ops = {
.exit_batch = gact_exit_net,
.id = &gact_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

MODULE_AUTHOR("Jamal Hadi Salim(2002-4)");
Expand Down
1 change: 1 addition & 0 deletions net/sched/act_ife.c
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ static struct pernet_operations ife_net_ops = {
.exit_batch = ife_exit_net,
.id = &ife_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

static int __init ife_init_module(void)
Expand Down
2 changes: 2 additions & 0 deletions net/sched/act_ipt.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ static struct pernet_operations ipt_net_ops = {
.exit_batch = ipt_exit_net,
.id = &ipt_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

static int tcf_xt_walker(struct net *net, struct sk_buff *skb,
Expand Down Expand Up @@ -399,6 +400,7 @@ static struct pernet_operations xt_net_ops = {
.exit_batch = xt_exit_net,
.id = &xt_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

MODULE_AUTHOR("Jamal Hadi Salim(2002-13)");
Expand Down
1 change: 1 addition & 0 deletions net/sched/act_mirred.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ static struct pernet_operations mirred_net_ops = {
.exit_batch = mirred_exit_net,
.id = &mirred_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

MODULE_AUTHOR("Jamal Hadi Salim(2002)");
Expand Down
1 change: 1 addition & 0 deletions net/sched/act_nat.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ static struct pernet_operations nat_net_ops = {
.exit_batch = nat_exit_net,
.id = &nat_net_id,
.size = sizeof(struct tc_action_net),
.async = true,
};

MODULE_DESCRIPTION("Stateless NAT actions");
Expand Down
Loading

0 comments on commit 23363b8

Please sign in to comment.