diff options
Diffstat (limited to 'net/core/sock.c')
-rw-r--r-- | net/core/sock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/sock.c b/net/core/sock.c index 3d7757ee2fc..1c4b1cd16d6 100644 --- a/net/core/sock.c +++ b/net/core/sock.c | |||
@@ -1913,7 +1913,7 @@ int proto_register(struct proto *prot, int alloc_slab) | |||
1913 | char *request_sock_slab_name = NULL; | 1913 | char *request_sock_slab_name = NULL; |
1914 | char *timewait_sock_slab_name; | 1914 | char *timewait_sock_slab_name; |
1915 | 1915 | ||
1916 | if (pcounter_alloc(&prot->inuse) != 0) { | 1916 | if (sock_prot_inuse_init(prot) != 0) { |
1917 | printk(KERN_CRIT "%s: Can't alloc inuse counters!\n", prot->name); | 1917 | printk(KERN_CRIT "%s: Can't alloc inuse counters!\n", prot->name); |
1918 | goto out; | 1918 | goto out; |
1919 | } | 1919 | } |
@@ -1984,7 +1984,7 @@ out_free_sock_slab: | |||
1984 | kmem_cache_destroy(prot->slab); | 1984 | kmem_cache_destroy(prot->slab); |
1985 | prot->slab = NULL; | 1985 | prot->slab = NULL; |
1986 | out_free_inuse: | 1986 | out_free_inuse: |
1987 | pcounter_free(&prot->inuse); | 1987 | sock_prot_inuse_free(prot); |
1988 | out: | 1988 | out: |
1989 | return -ENOBUFS; | 1989 | return -ENOBUFS; |
1990 | } | 1990 | } |
@@ -1997,7 +1997,7 @@ void proto_unregister(struct proto *prot) | |||
1997 | list_del(&prot->node); | 1997 | list_del(&prot->node); |
1998 | write_unlock(&proto_list_lock); | 1998 | write_unlock(&proto_list_lock); |
1999 | 1999 | ||
2000 | pcounter_free(&prot->inuse); | 2000 | sock_prot_inuse_free(prot); |
2001 | 2001 | ||
2002 | if (prot->slab != NULL) { | 2002 | if (prot->slab != NULL) { |
2003 | kmem_cache_destroy(prot->slab); | 2003 | kmem_cache_destroy(prot->slab); |