[CRIU] [PATCH 1/7] files: Rename real_pid to wait_id

Cyrill Gorcunov gorcunov at openvz.org
Thu Aug 23 04:48:10 EDT 2012


This entry has nothing to do with pid, it could
be even some other key used here.

Thus rename it to wait_id since it's just a key
to wait on.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 files.c         |    8 ++++----
 include/files.h |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/files.c b/files.c
index b72d9ef..fd50afc 100644
--- a/files.c
+++ b/files.c
@@ -162,7 +162,7 @@ static int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info)
 		return -1;
 
 	le->pid = pid;
-	futex_init(&le->real_pid);
+	futex_init(&le->wait_id);
 	le->fe = e;
 
 	fdesc = find_file_desc(e);
@@ -301,7 +301,7 @@ static int open_transport_fd(int pid, struct fdinfo_list_entry *fle)
 		return -1;
 
 	pr_info("\t\tWake up fdinfo pid=%d fd=%d\n", fle->pid, fle->fe->fd);
-	futex_set_and_wake(&fle->real_pid, getpid());
+	futex_set_and_wake(&fle->wait_id, getpid());
 
 	return 0;
 }
@@ -312,9 +312,9 @@ int send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int sock)
 	int len;
 
 	pr_info("\t\tWait fdinfo pid=%d fd=%d\n", fle->pid, fle->fe->fd);
-	futex_wait_while(&fle->real_pid, 0);
+	futex_wait_while(&fle->wait_id, 0);
 	transport_name_gen(&saddr, &len,
-			futex_get(&fle->real_pid), fle->fe->fd);
+			futex_get(&fle->wait_id), fle->fe->fd);
 	pr_info("\t\tSend fd %d to %s\n", fd, saddr.sun_path + 1);
 	return send_fd(sock, &saddr, len, fd);
 }
diff --git a/include/files.h b/include/files.h
index 7a2e99d..8eaeae3 100644
--- a/include/files.h
+++ b/include/files.h
@@ -48,7 +48,7 @@ struct fdinfo_list_entry {
 	struct file_desc	*desc;
 	struct list_head	ps_list;
 	int			pid;
-	futex_t			real_pid;
+	futex_t			wait_id;
 	FdinfoEntry		*fe;
 };
 
-- 
1.7.7.6



More information about the CRIU mailing list