Skip to content

Commit

Permalink
[NETNS]: Add netns refcnt debug for inet bind buckets.
Browse files Browse the repository at this point in the history
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Apr 16, 2008
1 parent 57d7a60 commit 8c5da49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/inet_hashtables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

if (tb != NULL) {
tb->ib_net = net;
tb->ib_net = hold_net(net);
tb->port = snum;
tb->fastreuse = 0;
INIT_HLIST_HEAD(&tb->owners);
Expand All @@ -51,6 +51,7 @@ void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket
{
if (hlist_empty(&tb->owners)) {
__hlist_del(&tb->node);
release_net(tb->ib_net);
kmem_cache_free(cachep, tb);
}
}
Expand Down

0 comments on commit 8c5da49

Please sign in to comment.