aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/Makefile2
-rw-r--r--net/nonet.c26
-rw-r--r--net/socket.c19
3 files changed, 0 insertions, 47 deletions
diff --git a/net/Makefile b/net/Makefile
index 7ed1970074b0..1f6c3e4b36d5 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -5,8 +5,6 @@
5# Rewritten to use lists instead of if-statements. 5# Rewritten to use lists instead of if-statements.
6# 6#
7 7
8obj-y := nonet.o
9
10obj-$(CONFIG_NET) := socket.o core/ 8obj-$(CONFIG_NET) := socket.o core/
11 9
12tmp-$(CONFIG_COMPAT) := compat.o 10tmp-$(CONFIG_COMPAT) := compat.o
diff --git a/net/nonet.c b/net/nonet.c
deleted file mode 100644
index b1a73fda9c12..000000000000
--- a/net/nonet.c
+++ /dev/null
@@ -1,26 +0,0 @@
1/*
2 * net/nonet.c
3 *
4 * Dummy functions to allow us to configure network support entirely
5 * out of the kernel.
6 *
7 * Distributed under the terms of the GNU GPL version 2.
8 * Copyright (c) Matthew Wilcox 2003
9 */
10
11#include <linux/module.h>
12#include <linux/errno.h>
13#include <linux/fs.h>
14#include <linux/init.h>
15#include <linux/kernel.h>
16
17static int sock_no_open(struct inode *irrelevant, struct file *dontcare)
18{
19 return -ENXIO;
20}
21
22const struct file_operations bad_sock_fops = {
23 .owner = THIS_MODULE,
24 .open = sock_no_open,
25 .llseek = noop_llseek,
26};
diff --git a/net/socket.c b/net/socket.c
index fe20c319a0bb..850f6c383342 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -113,7 +113,6 @@ unsigned int sysctl_net_busy_read __read_mostly;
113unsigned int sysctl_net_busy_poll __read_mostly; 113unsigned int sysctl_net_busy_poll __read_mostly;
114#endif 114#endif
115 115
116static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
117static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, 116static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov,
118 unsigned long nr_segs, loff_t pos); 117 unsigned long nr_segs, loff_t pos);
119static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov, 118static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov,
@@ -151,7 +150,6 @@ static const struct file_operations socket_file_ops = {
151 .compat_ioctl = compat_sock_ioctl, 150 .compat_ioctl = compat_sock_ioctl,
152#endif 151#endif
153 .mmap = sock_mmap, 152 .mmap = sock_mmap,
154 .open = sock_no_open, /* special open code to disallow open via /proc */
155 .release = sock_close, 153 .release = sock_close,
156 .fasync = sock_fasync, 154 .fasync = sock_fasync,
157 .sendpage = sock_sendpage, 155 .sendpage = sock_sendpage,
@@ -559,23 +557,6 @@ static struct socket *sock_alloc(void)
559 return sock; 557 return sock;
560} 558}
561 559
562/*
563 * In theory you can't get an open on this inode, but /proc provides
564 * a back door. Remember to keep it shut otherwise you'll let the
565 * creepy crawlies in.
566 */
567
568static int sock_no_open(struct inode *irrelevant, struct file *dontcare)
569{
570 return -ENXIO;
571}
572
573const struct file_operations bad_sock_fops = {
574 .owner = THIS_MODULE,
575 .open = sock_no_open,
576 .llseek = noop_llseek,
577};
578
579/** 560/**
580 * sock_release - close a socket 561 * sock_release - close a socket
581 * @sock: socket to close 562 * @sock: socket to close