[CRIU] [PATCH 06/19] sk-unix: Remove unused code in interconnected_pair()

Kirill Tkhai ktkhai at virtuozzo.com
Tue Jan 30 18:41:47 MSK 2018


Since new file engine was introduced, we don't care
which particular pid should be master or slave.

Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/sk-unix.c |   18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index b2db99eb8..14c81d6a7 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1645,22 +1645,8 @@ static void set_peer(struct unix_sk_info *ui, struct unix_sk_info *peer)
 
 static void interconnected_pair(struct unix_sk_info *ui, struct unix_sk_info *peer)
 {
-	struct fdinfo_list_entry *fle, *fle_peer;
-	/*
-	 * Select who will restore the pair. Check is identical to
-	 * the one in pipes.c and makes sure tasks wait for each other
-	 * in pids sorting order (ascending).
-	 */
-	fle = file_master(&ui->d);
-	fle_peer = file_master(&peer->d);
-
-	if (fdinfo_rst_prio(fle, fle_peer)) {
-		ui->flags |= USK_PAIR_MASTER;
-		peer->flags |= USK_PAIR_SLAVE;
-	} else {
-		peer->flags |= USK_PAIR_MASTER;
-		ui->flags |= USK_PAIR_SLAVE;
-	}
+	ui->flags |= USK_PAIR_MASTER;
+	peer->flags |= USK_PAIR_SLAVE;
 }
 
 static int fixup_unix_peer(struct unix_sk_info *ui)



More information about the CRIU mailing list