Skip to content

Commit

Permalink
net: Convert /proc creating and destroying pernet_operations
Browse files Browse the repository at this point in the history
These pernet_operations just create and destroy /proc entries,
and they can safely marked as async:

pppoe_net_ops
vlan_net_ops
canbcm_pernet_ops
kcm_net_ops
pfkey_net_ops
pppol2tp_net_ops
phonet_net_ops

Signed-off-by: Kirill Tkhai <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Kirill Tkhai authored and davem330 committed Feb 27, 2018
1 parent 7f897db commit c80afa0
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
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 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/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/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/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/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

0 comments on commit c80afa0

Please sign in to comment.