split on-disk cgroup validation from parent name generation
split on-disk cgroup validation from parent name generation

Split cgroup_find_parent cgroup/parent on-disk validation from cgroup parent
name generation.  This solves a chicken-and-egg problem for callers that need
to obtain a parent name from a cgroup that has not yet been created, such as
cgroup_create_cgroup_from_parent().  The new function enforces the documented
behavior (return NULL) when a "root" cgroup is specified.

Modify cgroup_create_cgroup_from_parent() to use this new function, and clean up
a few possibly-erroneous return values.

Signed-off-by: Eric Brower <bdb0317701a64f20cc7a52f641d0af1fd94e71a8@gmail.com>
Acked-by: Balbir Singh <65a1aed538f36fed73d8c45e9ddfc585ce9f4abf@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <f48451d72a1ad74c777093928b661ad7099a85df@gmail.com>

jrfastab/Linux-cgdcbxd,rafalmiel/libcg,rafalmiel/libcg,rafalmiel/libcg,jrfastab/Linux-cgdcbxd,jrfastab/Linux-cgdcbxd,rafalmiel/libcg,jrfastab/Linux-cgdcbxd