[CRIU] [PATCH 02/14] tcp: Move call to prepare socket

Pavel Emelyanov xemul at virtuozzo.com
Mon Apr 18 06:02:46 PDT 2016


The restore_tcp_queues() will become int sk agnostic.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/sk-tcp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/criu/sk-tcp.c b/criu/sk-tcp.c
index d923db4..d6ce73a 100644
--- a/criu/sk-tcp.c
+++ b/criu/sk-tcp.c
@@ -528,9 +528,6 @@ static int restore_tcp_queues(int sk, TcpStreamEntry *tse, struct cr_img *img)
 {
 	u32 len;
 
-	if (restore_prepare_socket(sk))
-		return -1;
-
 	len = tse->inq_len;
 	if (len && send_tcp_queue(sk, TCP_RECV_QUEUE, len, img))
 		return -1;
@@ -638,6 +635,9 @@ static int restore_tcp_conn_state(int sk, struct inet_sk_info *ii)
 	if (restore_tcp_opts(sk, tse))
 		goto err_c;
 
+	if (restore_prepare_socket(sk))
+		goto err_c;
+
 	if (restore_tcp_queues(sk, tse, img))
 		goto err_c;
 
-- 
2.5.0



More information about the CRIU mailing list