Refactor vps_create() function
Use classical unwind with series of labels and gotos.
This (hopefully) makes the code a bit easier to read, plus it actually
fixes a few corner cases:
1. An error message "Creation of container private area failed"
was not printed in all the failed cases.
2. A newly created config file was not deleted in case
then init_vps_param() fails.
3. Errors from vps_postcreate() were ignored.
4. vps_postcreate() creates VE root so we should clean it up in case of fail.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed