diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-27 20:22:29 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-28 00:11:33 +0200 |
commit | 7a15b2e013f535a125ad7351ffc808c79bc6de35 (patch) | |
tree | d6a4daa41899129ea82b20e0eafaa628455c261c /net/socket.c | |
parent | dlm: use the tcp version of accept_from_sock for sctp as well (diff) | |
download | linux-7a15b2e013f535a125ad7351ffc808c79bc6de35.tar.xz linux-7a15b2e013f535a125ad7351ffc808c79bc6de35.zip |
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.c | 34 |
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, ...) |