[15/28] files: Move fle_init() to files.c

Submitted by Kirill Tkhai on June 5, 2017, 5:25 p.m.

Details

Message ID 149668353832.25229.11341926521489220446.stgit@localhost.localdomain
State Accepted
Series "Support sockets leaked to child user_ns task"
Commit 372ed72dd0a2ac8687e32c4eeabbc698c8f37e8f
Headers show

Commit Message

Kirill Tkhai June 5, 2017, 5:25 p.m.
It has only one user. Also, in next patches will be
used pstree_item_by_virt() function, and I don't
want to add "#include" to "files.h" for it, and to
nest headers.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 criu/files.c         |    8 ++++++++
 criu/include/files.h |    8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/files.c b/criu/files.c
index 6aa88ba8b..6d21b9e1f 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -685,6 +685,14 @@  int rst_file_params(int fd, FownEntry *fown, int flags)
 	return 0;
 }
 
+static void fle_init(struct fdinfo_list_entry *fle, int pid, FdinfoEntry *fe)
+{
+	fle->pid = pid;
+	fle->fe = fe;
+	fle->received = 0;
+	fle->stage = FLE_INITIALIZED;
+}
+
 int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info)
 {
 	struct fdinfo_list_entry *le, *new_le;
diff --git a/criu/include/files.h b/criu/include/files.h
index 9cb4aef26..ef351b7e2 100644
--- a/criu/include/files.h
+++ b/criu/include/files.h
@@ -80,14 +80,6 @@  struct fdinfo_list_entry {
 	u8			stage:3;
 };
 
-static inline void fle_init(struct fdinfo_list_entry *fle, int pid, FdinfoEntry *fe)
-{
-	fle->pid = pid;
-	fle->fe = fe;
-	fle->received = 0;
-	fle->stage = FLE_INITIALIZED;
-}
-
 /* reports whether fd_a takes prio over fd_b */
 static inline int fdinfo_rst_prio(struct fdinfo_list_entry *fd_a, struct fdinfo_list_entry *fd_b)
 {