diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c index 6e0ccc09b313..dfe5b66c97e0 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -398,7 +398,7 @@ int sock_map_fd(struct socket *sock, int flags) | |||
398 | } | 398 | } |
399 | EXPORT_SYMBOL(sock_map_fd); | 399 | EXPORT_SYMBOL(sock_map_fd); |
400 | 400 | ||
401 | static struct socket *sock_from_file(struct file *file, int *err) | 401 | struct socket *sock_from_file(struct file *file, int *err) |
402 | { | 402 | { |
403 | if (file->f_op == &socket_file_ops) | 403 | if (file->f_op == &socket_file_ops) |
404 | return file->private_data; /* set in sock_map_fd */ | 404 | return file->private_data; /* set in sock_map_fd */ |
@@ -406,6 +406,7 @@ static struct socket *sock_from_file(struct file *file, int *err) | |||
406 | *err = -ENOTSOCK; | 406 | *err = -ENOTSOCK; |
407 | return NULL; | 407 | return NULL; |
408 | } | 408 | } |
409 | EXPORT_SYMBOL(sock_from_file); | ||
409 | 410 | ||
410 | /** | 411 | /** |
411 | * sockfd_lookup - Go from a file number to its socket slot | 412 | * sockfd_lookup - Go from a file number to its socket slot |
@@ -522,6 +523,9 @@ void sock_release(struct socket *sock) | |||
522 | if (rcu_dereference_protected(sock->wq, 1)->fasync_list) | 523 | if (rcu_dereference_protected(sock->wq, 1)->fasync_list) |
523 | printk(KERN_ERR "sock_release: fasync list not empty!\n"); | 524 | printk(KERN_ERR "sock_release: fasync list not empty!\n"); |
524 | 525 | ||
526 | if (test_bit(SOCK_EXTERNALLY_ALLOCATED, &sock->flags)) | ||
527 | return; | ||
528 | |||
525 | this_cpu_sub(sockets_in_use, 1); | 529 | this_cpu_sub(sockets_in_use, 1); |
526 | if (!sock->file) { | 530 | if (!sock->file) { |
527 | iput(SOCK_INODE(sock)); | 531 | iput(SOCK_INODE(sock)); |
@@ -551,8 +555,6 @@ static inline int __sock_sendmsg_nosec(struct kiocb *iocb, struct socket *sock, | |||
551 | 555 | ||
552 | sock_update_classid(sock->sk); | 556 | sock_update_classid(sock->sk); |
553 | 557 | ||
554 | sock_update_netprioidx(sock->sk); | ||
555 | |||
556 | si->sock = sock; | 558 | si->sock = sock; |
557 | si->scm = NULL; | 559 | si->scm = NULL; |
558 | si->msg = msg; | 560 | si->msg = msg; |