From: bfields@fieldses.org (J. Bruce Fields)
To: Christoph Hellwig <hch@lst.de>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] sunrpc: remove dead code in svc_sock_setbufsize
Date: Tue, 9 Jan 2018 14:19:37 -0500 [thread overview]
Message-ID: <20180109191937.GA18087@fieldses.org> (raw)
In-Reply-To: <20180108112104.3006-1-hch@lst.de>
Thanks, applying for 4.16.--b.
On Mon, Jan 08, 2018 at 12:21:04PM +0100, Christoph Hellwig wrote:
> 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 <hch@lst.de>
> ---
> 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)
> --
> 2.14.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2018-01-09 19:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-08 11:21 [PATCH] sunrpc: remove dead code in svc_sock_setbufsize Christoph Hellwig
2018-01-09 19:19 ` J. Bruce Fields [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180109191937.GA18087@fieldses.org \
--to=bfields@fieldses.org \
--cc=hch@lst.de \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).