diff options
author | Eric Dumazet <edumazet@google.com> | 2021-11-15 09:11:48 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-16 13:20:45 +0000 |
commit | d477eb9004845cb2dc92ad5eed79a437738a868a (patch) | |
tree | 674063d4742100736af21b37e179736d2251bb0b /include/net/sock.h | |
parent | 2a12ae5d433df3d3c3f1a930799ec09cb2b8058f (diff) | |
download | linux-d477eb9004845cb2dc92ad5eed79a437738a868a.tar.gz linux-d477eb9004845cb2dc92ad5eed79a437738a868a.tar.bz2 linux-d477eb9004845cb2dc92ad5eed79a437738a868a.zip |
net: make sock_inuse_add() available
MPTCP hard codes it, let us instead provide this helper.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 5a1e1df3cefd..c4c981a51797 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1439,6 +1439,12 @@ static inline void sock_prot_inuse_add(const struct net *net, { __this_cpu_add(net->core.prot_inuse->val[prot->inuse_idx], val); } + +static inline void sock_inuse_add(const struct net *net, int val) +{ + this_cpu_add(*net->core.sock_inuse, val); +} + int sock_prot_inuse_get(struct net *net, struct proto *proto); int sock_inuse_get(struct net *net); #else @@ -1446,6 +1452,10 @@ static inline void sock_prot_inuse_add(const struct net *net, const struct proto *prot, int val) { } + +static inline void sock_inuse_add(const struct net *net, int val) +{ +} #endif |