mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 01:00:58 +07:00
[NETNS]: Add netns refcnt debug for inet bind buckets.
Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
57d7a60092
commit
8c5da49a63
@ -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);
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user