net: drop nopreempt requirement on sock_prot_inuse_add()
[ Upstream commitb3cb764aa1] This is distracting really, let's make this simpler, because many callers had to take care of this by themselves, even if on x86 this adds more code than really needed. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Stable-dep-of:a9bf9c7dc6("af_unix: Annotate data-race of sk->sk_state in unix_stream_connect().") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
aa4ed1e0f6
commit
c8f2ebbb0e
+2
-2
@@ -1464,11 +1464,11 @@ proto_memory_pressure(struct proto *prot)
|
||||
struct prot_inuse {
|
||||
int val[PROTO_INUSE_NR];
|
||||
};
|
||||
/* Called with local bh disabled */
|
||||
|
||||
static inline void sock_prot_inuse_add(const struct net *net,
|
||||
const struct proto *prot, int val)
|
||||
{
|
||||
__this_cpu_add(net->core.prot_inuse->val[prot->inuse_idx], val);
|
||||
this_cpu_add(net->core.prot_inuse->val[prot->inuse_idx], val);
|
||||
}
|
||||
int sock_prot_inuse_get(struct net *net, struct proto *proto);
|
||||
int sock_inuse_get(struct net *net);
|
||||
|
||||
Reference in New Issue
Block a user