| .. | .. |
|---|
| 38 | 38 | #include "rds.h" |
|---|
| 39 | 39 | #include "tcp.h" |
|---|
| 40 | 40 | |
|---|
| 41 | | -static void rds_tcp_cork(struct socket *sock, int val) |
|---|
| 42 | | -{ |
|---|
| 43 | | - kernel_setsockopt(sock, SOL_TCP, TCP_CORK, (void *)&val, sizeof(val)); |
|---|
| 44 | | -} |
|---|
| 45 | | - |
|---|
| 46 | 41 | void rds_tcp_xmit_path_prepare(struct rds_conn_path *cp) |
|---|
| 47 | 42 | { |
|---|
| 48 | 43 | struct rds_tcp_connection *tc = cp->cp_transport_data; |
|---|
| 49 | 44 | |
|---|
| 50 | | - rds_tcp_cork(tc->t_sock, 1); |
|---|
| 45 | + tcp_sock_set_cork(tc->t_sock->sk, true); |
|---|
| 51 | 46 | } |
|---|
| 52 | 47 | |
|---|
| 53 | 48 | void rds_tcp_xmit_path_complete(struct rds_conn_path *cp) |
|---|
| 54 | 49 | { |
|---|
| 55 | 50 | struct rds_tcp_connection *tc = cp->cp_transport_data; |
|---|
| 56 | 51 | |
|---|
| 57 | | - rds_tcp_cork(tc->t_sock, 0); |
|---|
| 52 | + tcp_sock_set_cork(tc->t_sock->sk, false); |
|---|
| 58 | 53 | } |
|---|
| 59 | 54 | |
|---|
| 60 | 55 | /* the core send_sem serializes this with other xmit and shutdown */ |
|---|