From e73a67f7cd471a14bb1351954609e0b0ef5d2187 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 18 Mar 2017 21:20:27 -0400 Subject: don't open-code kernel_setsockopt() Signed-off-by: Al Viro --- net/rds/tcp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'net/rds/tcp.c') 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) -- cgit v1.2.3