[CRIU] [PATCH 04/20] mnt: Remove unneeded argument from prepare_mnt_ns

Pavel Emelyanov xemul at parallels.com
Tue Apr 22 09:35:43 PDT 2014


Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 include/mount.h |    2 +-
 mount.c         |    6 +++---
 namespaces.c    |    2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/mount.h b/include/mount.h
index b66aae6..a13483b 100644
--- a/include/mount.h
+++ b/include/mount.h
@@ -15,7 +15,7 @@ struct cr_fdset;
 struct ns_id;
 extern struct mount_info * collect_mntinfo(struct ns_id *ns);
 extern int dump_mnt_ns(struct ns_id *ns);
-extern int prepare_mnt_ns(int pid);
+extern int prepare_mnt_ns(void);
 
 extern int pivot_root(const char *new_root, const char *put_old);
 
diff --git a/mount.c b/mount.c
index 4dccff6..a1c653e 100644
--- a/mount.c
+++ b/mount.c
@@ -1659,7 +1659,7 @@ static int prepare_roots_yard(void)
 	return 0;
 }
 
-static int populate_mnt_ns(int ns_pid, struct mount_info *mis)
+static int populate_mnt_ns(struct mount_info *mis)
 {
 	struct mount_info *pms;
 	struct ns_id *nsid;
@@ -1713,7 +1713,7 @@ int fini_mnt_ns()
 	return ret;
 }
 
-int prepare_mnt_ns(int ns_pid)
+int prepare_mnt_ns(void)
 {
 	int ret = -1;
 	struct mount_info *mis, *old;
@@ -1772,7 +1772,7 @@ int prepare_mnt_ns(int ns_pid)
 
 	free_mntinfo(old);
 
-	ret = populate_mnt_ns(ns_pid, mis);
+	ret = populate_mnt_ns(mis);
 	if (ret)
 		goto out;
 
diff --git a/namespaces.c b/namespaces.c
index 41debb4..7a888af 100644
--- a/namespaces.c
+++ b/namespaces.c
@@ -527,7 +527,7 @@ int prepare_namespace(struct pstree_item *item, unsigned long clone_flags)
 	if ((clone_flags & CLONE_NEWIPC) && prepare_ipc_ns(id))
 		return -1;
 	id = ns_per_id ? item->ids->mnt_ns_id : pid;
-	if ((clone_flags & CLONE_NEWNS)  && prepare_mnt_ns(id))
+	if ((clone_flags & CLONE_NEWNS)  && prepare_mnt_ns())
 		return -1;
 
 	return 0;
-- 
1.7.6.5


More information about the CRIU mailing list