Commit ff9fb7cb authored by Roman Gushchin's avatar Roman Gushchin Committed by Tejun Heo
Browse files

kselftests: cgroup: don't fail on cg_kill_all() error in cg_destroy()



If the cgroup destruction races with an exit() of a belonging
process(es), cg_kill_all() may fail. It's not a good reason to make
cg_destroy() fail and leave the cgroup in place, potentially causing
next test runs to fail.

Signed-off-by: default avatarRoman Gushchin <guro@fb.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: kernel-team@fb.com
Cc: linux-kselftest@vger.kernel.org
parent 76f969e8
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -227,9 +227,7 @@ int cg_destroy(const char *cgroup)
retry:
	ret = rmdir(cgroup);
	if (ret && errno == EBUSY) {
		ret = cg_killall(cgroup);
		if (ret)
			return ret;
		cg_killall(cgroup);
		usleep(100);
		goto retry;
	}