[SOCK]: Drop per-proto inuse init and fre functions (v2).

Constructive part of the set is finished here. We have to remove the
pcounter, so start with its init and free functions.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Pavel Emelyanov
2008-03-28 16:39:10 -07:00
committed by David S. Miller
parent 1338d466d9
commit 60e7663d46
2 changed files with 1 additions and 28 deletions

View File

@@ -640,31 +640,13 @@ static inline void sk_refcnt_debug_release(const struct sock *sk)
# define REF_PROTO_INUSE(NAME) PCOUNTER_MEMBER_INITIALIZER(NAME, .inuse)
/* Called with local bh disabled */
extern void sock_prot_inuse_add(struct proto *prot, int inc);
static inline int sock_prot_inuse_init(struct proto *proto)
{
return pcounter_alloc(&proto->inuse);
}
extern int sock_prot_inuse_get(struct proto *proto);
static inline void sock_prot_inuse_free(struct proto *proto)
{
pcounter_free(&proto->inuse);
}
#else
# define DEFINE_PROTO_INUSE(NAME)
# define REF_PROTO_INUSE(NAME)
static void inline sock_prot_inuse_add(struct proto *prot, int inc)
{
}
static int inline sock_prot_inuse_init(struct proto *proto)
{
return 0;
}
static void inline sock_prot_inuse_free(struct proto *proto)
{
}
#endif