summaryrefslogtreecommitdiff
path: root/net/rxrpc
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-28 08:12:14 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-28 21:11:44 +0300
commit783da70e83967efeacf3c02c9dcfdc2b17bd62eb (patch)
treeb49f61f2855996d8eba63ca6b25cbc5a14b11ab5 /net/rxrpc
parent7594888c782e735f8a7b110094307a4dbe7b3f03 (diff)
downloadlinux-783da70e83967efeacf3c02c9dcfdc2b17bd62eb.tar.xz
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')
-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: