Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4e368b8 authored by T.J. Mercier's avatar T.J. Mercier Committed by Android (Google) Code Review
Browse files

Merge "libprocessgroup: CgroupSetup should fail if a required controller fails to mount" into main

parents ebd35be8 70daa285
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ static bool ActivateV2CgroupController(const CgroupDescriptor& descriptor) {

    if (!Mkdir(controller->path(), descriptor.mode(), descriptor.uid(), descriptor.gid())) {
        LOG(ERROR) << "Failed to create directory for " << controller->name() << " cgroup";
        return false;
        return descriptor.controller()->flags() & CGROUPRC_CONTROLLER_FLAG_OPTIONAL;
    }

    return ::ActivateControllers(controller->path(), {{controller->name(), descriptor}});
@@ -291,8 +291,8 @@ bool CgroupSetup() {
        }

        if (!SetupCgroup(descriptor)) {
            // issue a warning and proceed with the next cgroup
            LOG(WARNING) << "Failed to setup " << name << " cgroup";
            LOG(ERROR) << "Failed to setup " << name << " cgroup";
            return false;
        }
    }