aboutsummaryrefslogtreecommitdiff
path: root/net/rxrpc/local_object.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-28 07:12:14 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-28 11:11:44 -0700
commit783da70e83967efeacf3c02c9dcfdc2b17bd62eb (patch)
treeb49f61f2855996d8eba63ca6b25cbc5a14b11ab5 /net/rxrpc/local_object.c
parent7594888c782e735f8a7b110094307a4dbe7b3f03 (diff)
downloadlinux-stericsson-783da70e83967efeacf3c02c9dcfdc2b17bd62eb.tar.gz
net: add sock_enable_timestamps
Add a helper to directly enable timestamps instead of setting the SO_TIMESTAMP* sockopts from kernel space and going through a fake uaccess. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/local_object.c')
-rw-r--r--net/rxrpc/local_object.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c
index 01135e54d95d..5ea2bd01fdd5 100644
--- a/net/rxrpc/local_object.c
+++ b/net/rxrpc/local_object.c
@@ -189,13 +189,7 @@ static int rxrpc_open_socket(struct rxrpc_local *local, struct net *net)
}
/* We want receive timestamps. */
- opt = 1;
- ret = kernel_setsockopt(local->socket, SOL_SOCKET, SO_TIMESTAMPNS_OLD,
- (char *)&opt, sizeof(opt));
- if (ret < 0) {
- _debug("setsockopt failed");
- goto error;
- }
+ sock_enable_timestamps(local->socket->sk);
break;
default: