diff options
author | Eric Dumazet <edumazet@google.com> | 2021-11-15 09:11:50 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-16 13:20:45 +0000 |
commit | b3cb764aa1d753cf6a58858f9e2097ba71e8100b (patch) | |
tree | 7f2d751f3ec898f8cfb48df852e8beafdb6000a6 /net/xdp/xsk.c | |
parent | 4199bae10c49e24bc2c5d8c06a68820d56640000 (diff) | |
download | linux-b3cb764aa1d753cf6a58858f9e2097ba71e8100b.tar.gz linux-b3cb764aa1d753cf6a58858f9e2097ba71e8100b.tar.bz2 linux-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/xsk.c')
-rw-r--r-- | net/xdp/xsk.c | 4 |
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; } |