Commit 8c5da49a authored by Denis V. Lunev's avatar Denis V. Lunev Committed by David S. Miller

[NETNS]: Add netns refcnt debug for inet bind buckets.

Signed-off-by: default avatarDenis V. Lunev <den@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 57d7a600
...@@ -35,7 +35,7 @@ struct inet_bind_bucket *inet_bind_bucket_create(struct kmem_cache *cachep, ...@@ -35,7 +35,7 @@ struct inet_bind_bucket *inet_bind_bucket_create(struct kmem_cache *cachep,
struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC); struct inet_bind_bucket *tb = kmem_cache_alloc(cachep, GFP_ATOMIC);
if (tb != NULL) { if (tb != NULL) {
tb->ib_net = net; tb->ib_net = hold_net(net);
tb->port = snum; tb->port = snum;
tb->fastreuse = 0; tb->fastreuse = 0;
INIT_HLIST_HEAD(&tb->owners); INIT_HLIST_HEAD(&tb->owners);
...@@ -51,6 +51,7 @@ void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket ...@@ -51,6 +51,7 @@ void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket
{ {
if (hlist_empty(&tb->owners)) { if (hlist_empty(&tb->owners)) {
__hlist_del(&tb->node); __hlist_del(&tb->node);
release_net(tb->ib_net);
kmem_cache_free(cachep, tb); kmem_cache_free(cachep, tb);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment