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)
commit26e1a35ad6cd472489e52636ea2a32d7c52a494f
treed18ecf1c437ae64936226349ebaab124a1fb811a
parentb7ccd16223e59086ce9d8a6e2867683c597787ae
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