diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-28 07:12:14 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-28 20:11:44 +0200 |
commit | 783da70e83967efeacf3c02c9dcfdc2b17bd62eb (patch) | |
tree | b49f61f2855996d8eba63ca6b25cbc5a14b11ab5 /net/rxrpc | |
parent | net: add sock_bindtoindex (diff) | |
download | linux-783da70e83967efeacf3c02c9dcfdc2b17bd62eb.tar.xz linux-783da70e83967efeacf3c02c9dcfdc2b17bd62eb.zip |
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.c | 8 |
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: |