Browse code

use empty string as cgroup path to grab first find

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Andrew Hsu authored on 2018/12/07 03:49:51
Showing 2 changed files
... ...
@@ -1484,7 +1484,7 @@ func (daemon *Daemon) initCgroupsPath(path string) error {
1484 1484
 	// for the period and runtime as this limits what the children can be set to.
1485 1485
 	daemon.initCgroupsPath(filepath.Dir(path))
1486 1486
 
1487
-	mnt, root, err := cgroups.FindCgroupMountpointAndRoot("cpu")
1487
+	mnt, root, err := cgroups.FindCgroupMountpointAndRoot("", "cpu")
1488 1488
 	if err != nil {
1489 1489
 		return err
1490 1490
 	}
... ...
@@ -232,7 +232,7 @@ func checkCgroupCpusetInfo(cgMounts map[string]string, quiet bool) cgroupCpusetI
232 232
 
233 233
 // checkCgroupPids reads the pids information from the pids cgroup mount point.
234 234
 func checkCgroupPids(quiet bool) cgroupPids {
235
-	_, err := cgroups.FindCgroupMountpoint("pids")
235
+	_, err := cgroups.FindCgroupMountpoint("", "pids")
236 236
 	if err != nil {
237 237
 		if !quiet {
238 238
 			logrus.Warn(err)