summaryrefslogtreecommitdiffstats
path: root/net/rds/tcp.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-03-19 02:20:27 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-06 08:09:23 +0200
commite73a67f7cd471a14bb1351954609e0b0ef5d2187 (patch)
treeb5b8de7536d6ce142390889b2e8dd6f7936dcf55 /net/rds/tcp.c
parentLinux 4.11-rc1 (diff)
downloadlinux-e73a67f7cd471a14bb1351954609e0b0ef5d2187.tar.xz
linux-e73a67f7cd471a14bb1351954609e0b0ef5d2187.zip
don't open-code kernel_setsockopt()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/rds/tcp.c')
-rw-r--r--net/rds/tcp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/rds/tcp.c b/net/rds/tcp.c
index a973d3b4dff0..731282fbaf58 100644
--- a/net/rds/tcp.c
+++ b/net/rds/tcp.c
@@ -84,13 +84,10 @@ static struct ctl_table rds_tcp_sysctl_table[] = {
/* doing it this way avoids calling tcp_sk() */
void rds_tcp_nonagle(struct socket *sock)
{
- mm_segment_t oldfs = get_fs();
int val = 1;
- set_fs(KERNEL_DS);
- sock->ops->setsockopt(sock, SOL_TCP, TCP_NODELAY, (char __user *)&val,
+ kernel_setsockopt(sock, SOL_TCP, TCP_NODELAY, (void *)&val,
sizeof(val));
- set_fs(oldfs);
}
u32 rds_tcp_snd_nxt(struct rds_tcp_connection *tc)