DevinLeamy commented on code in PR #525:
URL: https://github.com/apache/mesos/pull/525#discussion_r1530999812


##########
src/linux/cgroups2.cpp:
##########
@@ -259,12 +265,11 @@ Try<Nothing> create(const string& cgroup, bool recursive)
 
 Try<Nothing> destroy(const string& cgroup)
 {
-  const string absolutePath = path::join(MOUNT_POINT, cgroup);
-
-  if (!os::exists(absolutePath)) {
-    return Error("There does not exist a cgroup at '" + absolutePath + "'");
+  if (!cgroups2::exists(cgroup)) {
+    return Error("Cgroup '" + cgroup + "' does not exist");
   }
 
+  const string absolutePath = path::join(MOUNT_POINT, cgroup);

Review Comment:
   Can remove this change, but I think it's relevant because we're replacing 
the if statement check if an equivalent but more readable check. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to