sunrpc: remove dead code in svc_sock_setbufsize

"Linux Kernel Mailing List" <[email protected]>
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/d0945caafcccac9d8f4d78f99e0eac9e60386381
Commit:     d0945caafcccac9d8f4d78f99e0eac9e60386381
Parent:     482725027ff32bc857f5527fb17feda5361265fe
Refname:    refs/heads/master
Author:     Christoph Hellwig <[email protected]>
AuthorDate: Mon Jan 8 12:21:04 2018 +0100
Committer:  J. Bruce Fields <[email protected]>
CommitDate: Mon Feb 5 17:13:16 2018 -0500

    sunrpc: remove dead code in svc_sock_setbufsize
    
    Setting values in struct sock directly is the usual method.  Remove
    the long dead code using set_fs() and the related comment.
    
    Signed-off-by: Christoph Hellwig <[email protected]>
    Signed-off-by: J. Bruce Fields <[email protected]>
---
 net/sunrpc/svcsock.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index ff8e06cd067e..5884583f93a4 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -384,25 +384,11 @@ static int svc_partial_recvfrom(struct svc_rqst *rqstp,
 static void svc_sock_setbufsize(struct socket *sock, unsigned int snd,
 				unsigned int rcv)
 {
-#if 0
-	mm_segment_t	oldfs;
-	oldfs = get_fs(); set_fs(KERNEL_DS);
-	sock_setsockopt(sock, SOL_SOCKET, SO_SNDBUF,
-			(char*)&snd, sizeof(snd));
-	sock_setsockopt(sock, SOL_SOCKET, SO_RCVBUF,
-			(char*)&rcv, sizeof(rcv));
-#else
-	/* sock_setsockopt limits use to sysctl_?mem_max,
-	 * which isn't acceptable.  Until that is made conditional
-	 * on not having CAP_SYS_RESOURCE or similar, we go direct...
-	 * DaveM said I could!
-	 */
 	lock_sock(sock->sk);
 	sock->sk->sk_sndbuf = snd * 2;
 	sock->sk->sk_rcvbuf = rcv * 2;
 	sock->sk->sk_write_space(sock->sk);
 	release_sock(sock->sk);
-#endif
 }
 
 static int svc_sock_secure_port(struct svc_rqst *rqstp)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.