[CRIU] [PATCH] mount: Use is_root_mount helper instead of strcmp

Cyrill Gorcunov gorcunov at openvz.org
Wed Nov 27 05:31:27 PST 2013


It's designed specificly for that.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 mount.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mount.c b/mount.c
index d244cd1939ff..71b330ecd6ca 100644
--- a/mount.c
+++ b/mount.c
@@ -135,7 +135,7 @@ static struct mount_info *mnt_build_ids_tree(struct mount_info *list)
 		p = __lookup_mnt_id(list, m->parent_mnt_id);
 		if (!p) {
 			/* This should be / */
-			if (root == NULL && !strcmp(m->mountpoint, "/")) {
+			if (root == NULL && is_root_mount(m)) {
 				root = m;
 				continue;
 			}
-- 
1.8.3.1



More information about the CRIU mailing list