aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix
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/unix
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/unix')
-rw-r--r--net/unix/af_unix.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 78e08e82c08c..54e5553a150e 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -522,9 +522,7 @@ static void unix_sock_destructor(struct sock *sk)
unix_release_addr(u->addr);
atomic_long_dec(&unix_nr_socks);
- local_bh_disable();
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
- local_bh_enable();
#ifdef UNIX_REFCNT_DEBUG
pr_debug("UNIX %p is destroyed, %ld are still alive.\n", sk,
atomic_long_read(&unix_nr_socks));
@@ -889,9 +887,7 @@ static struct sock *unix_create1(struct net *net, struct socket *sock, int kern,
memset(&u->scm_stat, 0, sizeof(struct scm_stat));
unix_insert_socket(unix_sockets_unbound(sk), sk);
- local_bh_disable();
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
- local_bh_enable();
return sk;