Commit a36917d4 authored by Pavel Emelyanov's avatar Pavel Emelyanov

mnt: Clean up namespaces walking code

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2d3fa5e7
......@@ -2078,7 +2078,7 @@ int mntns_get_root_by_mnt_id(int mnt_id)
return mntns_get_root_fd(mntns);
}
static int walk_mnt_ns(int (*cb)(struct ns_id *, struct mount_info *, void *), void *arg)
int collect_mnt_namespaces(void)
{
struct mount_info *pms;
struct ns_id *ns;
......@@ -2116,11 +2116,9 @@ static int walk_mnt_ns(int (*cb)(struct ns_id *, struct mount_info *, void *), v
if (pms == NULL)
goto err;
if (cb && cb(ns, pms, arg))
goto err;
mntinfo_add_list(pms);
}
if (collect_shared(mntinfo))
goto err;
if (validate_mounts(mntinfo, true))
......@@ -2131,11 +2129,6 @@ err:
return ret;
}
int collect_mnt_namespaces(void)
{
return walk_mnt_ns(NULL, NULL);
}
int dump_mnt_namespaces(void)
{
struct ns_id *nsid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment