diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index abc6341f536f..ebf9552664b2 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -639,18 +639,15 @@ static inline void sk_refcnt_debug_release(const struct sock *sk) | |||
639 | # define DEFINE_PROTO_INUSE(NAME) DEFINE_PCOUNTER(NAME) | 639 | # define DEFINE_PROTO_INUSE(NAME) DEFINE_PCOUNTER(NAME) |
640 | # define REF_PROTO_INUSE(NAME) PCOUNTER_MEMBER_INITIALIZER(NAME, .inuse) | 640 | # define REF_PROTO_INUSE(NAME) PCOUNTER_MEMBER_INITIALIZER(NAME, .inuse) |
641 | /* Called with local bh disabled */ | 641 | /* Called with local bh disabled */ |
642 | static inline void sock_prot_inuse_add(struct proto *prot, int inc) | 642 | extern void sock_prot_inuse_add(struct proto *prot, int inc); |
643 | { | 643 | |
644 | pcounter_add(&prot->inuse, inc); | ||
645 | } | ||
646 | static inline int sock_prot_inuse_init(struct proto *proto) | 644 | static inline int sock_prot_inuse_init(struct proto *proto) |
647 | { | 645 | { |
648 | return pcounter_alloc(&proto->inuse); | 646 | return pcounter_alloc(&proto->inuse); |
649 | } | 647 | } |
650 | static inline int sock_prot_inuse_get(struct proto *proto) | 648 | |
651 | { | 649 | extern int sock_prot_inuse_get(struct proto *proto); |
652 | return pcounter_getval(&proto->inuse); | 650 | |
653 | } | ||
654 | static inline void sock_prot_inuse_free(struct proto *proto) | 651 | static inline void sock_prot_inuse_free(struct proto *proto) |
655 | { | 652 | { |
656 | pcounter_free(&proto->inuse); | 653 | pcounter_free(&proto->inuse); |