After adjusting mounts sort the final slice to make sure
that any potential subdirectories are mounted only after
their parents.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
When adjusting CPU or memory resources, check for each field
whether it is set (IOW adjusted by a plugin) before updating.
The field getters return the corresponding golang zero value
for unset fields. Therefore unconditionally adjusting unset
Spec fields resets the fields instead. This manifests itself
by all container CPU resources getting cleared when NRI is
enabled but no plugins are running or none of the running
plugins are adjust resources.
Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>