aboutsummaryrefslogtreecommitdiffstats
path: root/net/xdp
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-11-15 09:11:50 -0800
committerDavid S. Miller <davem@davemloft.net>2021-11-16 13:20:45 +0000
commitb3cb764aa1d753cf6a58858f9e2097ba71e8100b (patch)
tree7f2d751f3ec898f8cfb48df852e8beafdb6000a6 /net/xdp
parentnet: merge net->core.prot_inuse and net->core.sock_inuse (diff)
downloadlinux-dev-b3cb764aa1d753cf6a58858f9e2097ba71e8100b.tar.xz
linux-dev-b3cb764aa1d753cf6a58858f9e2097ba71e8100b.zip
net: drop nopreempt requirement on sock_prot_inuse_add()
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>
Diffstat (limited to 'net/xdp')
-rw-r--r--net/xdp/xsk.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index f16074eb53c7..28ef3f4465ae 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -794,9 +794,7 @@ static int xsk_release(struct socket *sock)
sk_del_node_init_rcu(sk);
mutex_unlock(&net->xdp.lock);
- local_bh_disable();
sock_prot_inuse_add(net, sk->sk_prot, -1);
- local_bh_enable();
xsk_delete_from_maps(xs);
mutex_lock(&xs->mutex);
@@ -1396,9 +1394,7 @@ static int xsk_create(struct net *net, struct socket *sock, int protocol,
sk_add_node_rcu(sk, &net->xdp.list);
mutex_unlock(&net->xdp.lock);
- local_bh_disable();
sock_prot_inuse_add(net, &xsk_proto, 1);
- local_bh_enable();
return 0;
}