mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
[DCCP]: Rename init_dccp_v4_mibs to dccp_mib_init
And introduce dccp_mib_exit grouping previously open coded sequence. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
075ae86611
commit
46f09ffa7d
@ -933,7 +933,7 @@ void dccp_ctl_sock_exit(void)
|
|||||||
EXPORT_SYMBOL_GPL(dccp_ctl_sock_exit);
|
EXPORT_SYMBOL_GPL(dccp_ctl_sock_exit);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int __init init_dccp_v4_mibs(void)
|
static int __init dccp_mib_init(void)
|
||||||
{
|
{
|
||||||
int rc = -ENOMEM;
|
int rc = -ENOMEM;
|
||||||
|
|
||||||
@ -955,6 +955,13 @@ out_free_one:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int dccp_mib_exit(void)
|
||||||
|
{
|
||||||
|
free_percpu(dccp_statistics[0]);
|
||||||
|
free_percpu(dccp_statistics[1]);
|
||||||
|
dccp_statistics[0] = dccp_statistics[1] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static int thash_entries;
|
static int thash_entries;
|
||||||
module_param(thash_entries, int, 0444);
|
module_param(thash_entries, int, 0444);
|
||||||
MODULE_PARM_DESC(thash_entries, "Number of ehash buckets");
|
MODULE_PARM_DESC(thash_entries, "Number of ehash buckets");
|
||||||
@ -1044,7 +1051,7 @@ static int __init dccp_init(void)
|
|||||||
INIT_HLIST_HEAD(&dccp_hashinfo.bhash[i].chain);
|
INIT_HLIST_HEAD(&dccp_hashinfo.bhash[i].chain);
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = init_dccp_v4_mibs();
|
rc = dccp_mib_init();
|
||||||
if (rc)
|
if (rc)
|
||||||
goto out_free_dccp_bhash;
|
goto out_free_dccp_bhash;
|
||||||
|
|
||||||
@ -1075,9 +1082,7 @@ out_unregister_protosw:
|
|||||||
inet_unregister_protosw(&dccp_v4_protosw);
|
inet_unregister_protosw(&dccp_v4_protosw);
|
||||||
inet_del_protocol(&dccp_protocol, IPPROTO_DCCP);
|
inet_del_protocol(&dccp_protocol, IPPROTO_DCCP);
|
||||||
out_free_dccp_v4_mibs:
|
out_free_dccp_v4_mibs:
|
||||||
free_percpu(dccp_statistics[0]);
|
dccp_mib_exit();
|
||||||
free_percpu(dccp_statistics[1]);
|
|
||||||
dccp_statistics[0] = dccp_statistics[1] = NULL;
|
|
||||||
out_free_dccp_bhash:
|
out_free_dccp_bhash:
|
||||||
free_pages((unsigned long)dccp_hashinfo.bhash, bhash_order);
|
free_pages((unsigned long)dccp_hashinfo.bhash, bhash_order);
|
||||||
dccp_hashinfo.bhash = NULL;
|
dccp_hashinfo.bhash = NULL;
|
||||||
@ -1102,8 +1107,7 @@ static void __exit dccp_fini(void)
|
|||||||
if (inet_del_protocol(&dccp_protocol, IPPROTO_DCCP) < 0)
|
if (inet_del_protocol(&dccp_protocol, IPPROTO_DCCP) < 0)
|
||||||
printk(dccp_del_proto_err_msg);
|
printk(dccp_del_proto_err_msg);
|
||||||
|
|
||||||
free_percpu(dccp_statistics[0]);
|
dccp_mib_exit();
|
||||||
free_percpu(dccp_statistics[1]);
|
|
||||||
free_pages((unsigned long)dccp_hashinfo.bhash,
|
free_pages((unsigned long)dccp_hashinfo.bhash,
|
||||||
get_order(dccp_hashinfo.bhash_size *
|
get_order(dccp_hashinfo.bhash_size *
|
||||||
sizeof(struct inet_bind_hashbucket)));
|
sizeof(struct inet_bind_hashbucket)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user