summaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-27 21:22:29 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-28 01:11:33 +0300
commit7a15b2e013f535a125ad7351ffc808c79bc6de35 (patch)
treed6a4daa41899129ea82b20e0eafaa628455c261c /net/socket.c
parent0774dc7643db525f0bb9d0aa212cbfad3a412fc6 (diff)
downloadlinux-7a15b2e013f535a125ad7351ffc808c79bc6de35.tar.xz
net: remove kernel_getsockopt
No users left. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/net/socket.c b/net/socket.c
index 80422fc3c836..81a98b6cbd08 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -3625,40 +3625,6 @@ int kernel_getpeername(struct socket *sock, struct sockaddr *addr)
EXPORT_SYMBOL(kernel_getpeername);
/**
- * kernel_getsockopt - get a socket option (kernel space)
- * @sock: socket
- * @level: API level (SOL_SOCKET, ...)
- * @optname: option tag
- * @optval: option value
- * @optlen: option length
- *
- * Assigns the option length to @optlen.
- * Returns 0 or an error.
- */
-
-int kernel_getsockopt(struct socket *sock, int level, int optname,
- char *optval, int *optlen)
-{
- mm_segment_t oldfs = get_fs();
- char __user *uoptval;
- int __user *uoptlen;
- int err;
-
- uoptval = (char __user __force *) optval;
- uoptlen = (int __user __force *) optlen;
-
- set_fs(KERNEL_DS);
- if (level == SOL_SOCKET)
- err = sock_getsockopt(sock, level, optname, uoptval, uoptlen);
- else
- err = sock->ops->getsockopt(sock, level, optname, uoptval,
- uoptlen);
- set_fs(oldfs);
- return err;
-}
-EXPORT_SYMBOL(kernel_getsockopt);
-
-/**
* kernel_setsockopt - set a socket option (kernel space)
* @sock: socket
* @level: API level (SOL_SOCKET, ...)