mount: Use is_root_mount helper instead of strcmp

It's designed specificly for that.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2013-11-28 15:46:00 +04:00 committed by Pavel Emelyanov
parent d7141750d2
commit f4e40ef7e2

View file

@ -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;
}