vzlist: fix bogus CTIDs in list

After commit 95f0ec2 we call get_mounted_status() conditionally.
If it is not called we do not remove containers with non-existing
VE_PRIVATE. That results in strange effects like CTID of 0 to appear
in vzlist -1a output.

Rework the optimization done in 95f0ec2/r928084 to not be too agressive.

https://bugzilla.openvz.org/2830

Reported-by: Tyler Bishop <tyler.bishop@beyondhosting.net>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed