[CRIU] [PATCH cr] tcp: rename functions for unlocking tcp connections

Andrey Vagin avagin at openvz.org
Mon Sep 17 11:26:12 EDT 2012


One function is used on restoring and one is used on dumping,
so each function has own prefix rst or cpt.
The both functions have the same effect, so the main part of the names
is same and it describes "unlock_tcp_connections".

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 include/sk-inet.h |    4 ++--
 net.c             |    4 ++--
 sk-tcp.c          |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/sk-inet.h b/include/sk-inet.h
index 29c2d22..bef909c 100644
--- a/include/sk-inet.h
+++ b/include/sk-inet.h
@@ -52,9 +52,9 @@ static inline void tcp_repair_off(int fd)
 		pr_perror("Failed to turn off repair mode on socket");
 }
 
-void tcp_unlock_all(void);
 void tcp_locked_conn_add(struct inet_sk_info *);
-void tcp_unlock_connections(void);
+void rst_unlock_tcp_connections(void);
+void cpt_unlock_tcp_connections(void);
 
 int dump_one_tcp(int sk, struct inet_sk_desc *sd);
 int restore_one_tcp(int sk, struct inet_sk_info *si);
diff --git a/net.c b/net.c
index 977544e..0e5017b 100644
--- a/net.c
+++ b/net.c
@@ -423,8 +423,8 @@ void network_unlock(void)
 	pr_info("Unlock network\n");
 
 	if  (!(opts.namespaces_flags & CLONE_NEWNET)) {
-		tcp_unlock_all();
-		tcp_unlock_connections();
+		cpt_unlock_tcp_connections();
+		rst_unlock_tcp_connections();
 
 		return;
 	}
diff --git a/sk-tcp.c b/sk-tcp.c
index 1622df6..fbebd08 100644
--- a/sk-tcp.c
+++ b/sk-tcp.c
@@ -103,7 +103,7 @@ static void tcp_unlock_one(struct inet_sk_desc *sk)
 	close(sk->rfd);
 }
 
-void tcp_unlock_all(void)
+void cpt_unlock_tcp_connections(void)
 {
 	struct inet_sk_desc *sk, *n;
 
@@ -544,7 +544,7 @@ void tcp_locked_conn_add(struct inet_sk_info *ii)
 	list_add_tail(&ii->rlist, &rst_tcp_repair_sockets);
 }
 
-void tcp_unlock_connections(void)
+void rst_unlock_tcp_connections(void)
 {
 	struct inet_sk_info *ii;
 
-- 
1.7.1



More information about the CRIU mailing list