Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22212
b: refs/heads/master
c: 46f09ff
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Mar 21, 2006
1 parent 3fa6fb0 commit 7df00be
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 075ae86611011e1acdda9df6a7e30f8508b31fd6
refs/heads/master: 46f09ffa7db595f49fb42338e013417756816d37
18 changes: 11 additions & 7 deletions trunk/net/dccp/proto.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ void dccp_ctl_sock_exit(void)
EXPORT_SYMBOL_GPL(dccp_ctl_sock_exit);
#endif

static int __init init_dccp_v4_mibs(void)
static int __init dccp_mib_init(void)
{
int rc = -ENOMEM;

Expand All @@ -955,6 +955,13 @@ static int __init init_dccp_v4_mibs(void)

}

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;
module_param(thash_entries, int, 0444);
MODULE_PARM_DESC(thash_entries, "Number of ehash buckets");
Expand Down Expand Up @@ -1044,7 +1051,7 @@ static int __init dccp_init(void)
INIT_HLIST_HEAD(&dccp_hashinfo.bhash[i].chain);
}

rc = init_dccp_v4_mibs();
rc = dccp_mib_init();
if (rc)
goto out_free_dccp_bhash;

Expand Down Expand Up @@ -1075,9 +1082,7 @@ static int __init dccp_init(void)
inet_unregister_protosw(&dccp_v4_protosw);
inet_del_protocol(&dccp_protocol, IPPROTO_DCCP);
out_free_dccp_v4_mibs:
free_percpu(dccp_statistics[0]);
free_percpu(dccp_statistics[1]);
dccp_statistics[0] = dccp_statistics[1] = NULL;
dccp_mib_exit();
out_free_dccp_bhash:
free_pages((unsigned long)dccp_hashinfo.bhash, bhash_order);
dccp_hashinfo.bhash = NULL;
Expand All @@ -1102,8 +1107,7 @@ static void __exit dccp_fini(void)
if (inet_del_protocol(&dccp_protocol, IPPROTO_DCCP) < 0)
printk(dccp_del_proto_err_msg);

free_percpu(dccp_statistics[0]);
free_percpu(dccp_statistics[1]);
dccp_mib_exit();
free_pages((unsigned long)dccp_hashinfo.bhash,
get_order(dccp_hashinfo.bhash_size *
sizeof(struct inet_bind_hashbucket)));
Expand Down

0 comments on commit 7df00be

Please sign in to comment.