Skip to content

Commit 5311f70

Browse files
committed
dlm: use SO_SNDTIMEO_NEW instead of SO_SNDTIMEO_OLD
Eliminate one more use of 'struct timeval' from the kernel so we can eventually remove the definition as well. The kernel supports the new format with a 64-bit time_t version of timeval here, so use that instead of the old timeval. Acked-by: Deepa Dinamani <deepa.kernel@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 74b5cab commit 5311f70

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎fs/dlm/lowcomms.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ static void sctp_connect_to_sock(struct connection *con)
10351035
int result;
10361036
int addr_len;
10371037
struct socket *sock;
1038-
struct timeval tv = { .tv_sec = 5, .tv_usec = 0 };
1038+
struct __kernel_sock_timeval tv = { .tv_sec = 5, .tv_usec = 0 };
10391039

10401040
if (con->nodeid == 0) {
10411041
log_print("attempt to connect sock 0 foiled");
@@ -1087,12 +1087,12 @@ static void sctp_connect_to_sock(struct connection *con)
10871087
* since O_NONBLOCK argument in connect() function does not work here,
10881088
* then, we should restore the default value of this attribute.
10891089
*/
1090-
kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO_OLD, (char *)&tv,
1090+
kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO_NEW, (char *)&tv,
10911091
sizeof(tv));
10921092
result = sock->ops->connect(sock, (struct sockaddr *)&daddr, addr_len,
10931093
0);
10941094
memset(&tv, 0, sizeof(tv));
1095-
kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO_OLD, (char *)&tv,
1095+
kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO_NEW, (char *)&tv,
10961096
sizeof(tv));
10971097

10981098
if (result == -EINPROGRESS)

0 commit comments

Comments
 (0)