aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/socket.c b/net/socket.c
index 884e32997698..9963a0b53a64 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -576,9 +576,6 @@ void sock_release(struct socket *sock)
576 if (rcu_dereference_protected(sock->wq, 1)->fasync_list) 576 if (rcu_dereference_protected(sock->wq, 1)->fasync_list)
577 pr_err("%s: fasync list not empty!\n", __func__); 577 pr_err("%s: fasync list not empty!\n", __func__);
578 578
579 if (test_bit(SOCK_EXTERNALLY_ALLOCATED, &sock->flags))
580 return;
581
582 this_cpu_sub(sockets_in_use, 1); 579 this_cpu_sub(sockets_in_use, 1);
583 if (!sock->file) { 580 if (!sock->file) {
584 iput(SOCK_INODE(sock)); 581 iput(SOCK_INODE(sock));
@@ -1213,9 +1210,9 @@ int sock_create(int family, int type, int protocol, struct socket **res)
1213} 1210}
1214EXPORT_SYMBOL(sock_create); 1211EXPORT_SYMBOL(sock_create);
1215 1212
1216int sock_create_kern(int family, int type, int protocol, struct socket **res) 1213int sock_create_kern(struct net *net, int family, int type, int protocol, struct socket **res)
1217{ 1214{
1218 return __sock_create(&init_net, family, type, protocol, res, 1); 1215 return __sock_create(net, family, type, protocol, res, 1);
1219} 1216}
1220EXPORT_SYMBOL(sock_create_kern); 1217EXPORT_SYMBOL(sock_create_kern);
1221 1218