socket: move compat timeout handling into sock.c
authorArnd Bergmann <arnd@arndb.de>
Sat, 2 Feb 2019 15:34:44 +0000 (07:34 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Feb 2019 19:17:30 +0000 (11:17 -0800)
commitfe0c72f3db11be752e7c06efad9fa27af1327c47
treed18ecf1c437ae64936226349ebaab124a1fb811a
parenta9bcfd1d176eb2109f74e1e4eeabdedf22321003
socket: move compat timeout handling into sock.c

This is a cleanup to prepare for the addition of 64-bit time_t
in O_SNDTIMEO/O_RCVTIMEO. The existing compat handler seems
unnecessarily complex and error-prone, moving it all into the
main setsockopt()/getsockopt() implementation requires half
as much code and is easier to extend.

32-bit user space can now use old_timeval32 on both 32-bit
and 64-bit machines, while 64-bit code can use
__old_kernel_timeval.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/compat.c
net/core/sock.c
net/vmw_vsock/af_vsock.c