[CRIU] [PATCH 3/7] mount: mnt_build_ids_tree -- Rename @p to @parent

Cyrill Gorcunov gorcunov at openvz.org
Thu Sep 3 03:05:10 PDT 2015


The function is too big and @p is too short.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 mount.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/mount.c b/mount.c
index b7185c1b5175..56f410c9d905 100644
--- a/mount.c
+++ b/mount.c
@@ -323,16 +323,16 @@ static struct mount_info *mnt_build_ids_tree(struct mount_info *list)
 
 	pr_debug("\tBuilding plain mount tree\n");
 	for (m = list; m != NULL; m = m->next) {
-		struct mount_info *p;
+		struct mount_info *parent;
 
 		pr_debug("\t\tWorking on %d->%d\n", m->mnt_id, m->parent_mnt_id);
 
 		if (m->mnt_id != m->parent_mnt_id)
-			p = __lookup_mnt_id(list, m->parent_mnt_id);
+			parent = __lookup_mnt_id(list, m->parent_mnt_id);
 		else /* a circular mount reference. It's rootfs or smth like it. */
-			p = NULL;
+			parent = NULL;
 
-		if (!p) {
+		if (!parent) {
 			/* This should be / */
 			if (root == NULL && is_root_mount(m)) {
 				root = m;
@@ -355,13 +355,13 @@ static struct mount_info *mnt_build_ids_tree(struct mount_info *list)
 				 * root mount namespace, so its parent is
 				 * the main root.
 				 */
-				p = tmp_root_mount;
+				parent = tmp_root_mount;
 			} else
 				return NULL;
 		}
 
-		m->parent = p;
-		list_add_tail(&m->siblings, &p->children);
+		m->parent = parent;
+		list_add_tail(&m->siblings, &parent->children);
 	}
 
 	if (!root) {
-- 
2.4.3



More information about the CRIU mailing list