aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/net/socket.c b/net/socket.c
index b13042f68c02..23898f45f713 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -119,10 +119,6 @@ static ssize_t sock_writev(struct file *file, const struct iovec *vector,
119static ssize_t sock_sendpage(struct file *file, struct page *page, 119static ssize_t sock_sendpage(struct file *file, struct page *page,
120 int offset, size_t size, loff_t *ppos, int more); 120 int offset, size_t size, loff_t *ppos, int more);
121 121
122extern ssize_t generic_splice_sendpage(struct inode *inode, struct file *out,
123 size_t len, unsigned int flags);
124
125
126/* 122/*
127 * Socket files have a set of 'special' operations as well as the generic file ones. These don't appear 123 * Socket files have a set of 'special' operations as well as the generic file ones. These don't appear
128 * in the operation structures but are done directly via the socketcall() multiplexor. 124 * in the operation structures but are done directly via the socketcall() multiplexor.
@@ -1418,7 +1414,8 @@ asmlinkage long sys_accept(int fd, struct sockaddr __user *upeer_sockaddr, int _
1418 newfd = sock_alloc_fd(&newfile); 1414 newfd = sock_alloc_fd(&newfile);
1419 if (unlikely(newfd < 0)) { 1415 if (unlikely(newfd < 0)) {
1420 err = newfd; 1416 err = newfd;
1421 goto out_release; 1417 sock_release(newsock);
1418 goto out_put;
1422 } 1419 }
1423 1420
1424 err = sock_attach_fd(newsock, newfile); 1421 err = sock_attach_fd(newsock, newfile);
@@ -1455,10 +1452,8 @@ out_put:
1455out: 1452out:
1456 return err; 1453 return err;
1457out_fd: 1454out_fd:
1458 put_filp(newfile); 1455 fput(newfile);
1459 put_unused_fd(newfd); 1456 put_unused_fd(newfd);
1460out_release:
1461 sock_release(newsock);
1462 goto out_put; 1457 goto out_put;
1463} 1458}
1464 1459
@@ -2137,7 +2132,7 @@ void socket_seq_show(struct seq_file *seq)
2137 int cpu; 2132 int cpu;
2138 int counter = 0; 2133 int counter = 0;
2139 2134
2140 for_each_cpu(cpu) 2135 for_each_possible_cpu(cpu)
2141 counter += per_cpu(sockets_in_use, cpu); 2136 counter += per_cpu(sockets_in_use, cpu);
2142 2137
2143 /* It can be negative, by the way. 8) */ 2138 /* It can be negative, by the way. 8) */