code: func mountHostV1Cgroups(m fs.Mounter, enabledCgroups map[int][]string) error {
  	systemdControllerPath := "/sys/fs/cgroup/systemd"
  	if !areHostV1CgroupsMounted(enabledCgroups) {
  		mountContext := os.Getenv(common.EnvSELinuxMountContext)
  		if err := v1.CreateCgroups(m, "/", enabledCgroups, mountContext); err != nil {
  			return errwrap.Wrap(errors.New("error creating host cgroups"), err)
  		}
  	}
  
  	mounted, err := v1.IsControllerMounted("systemd")
  	if err != nil {
  		return err
  	}
  	if !mounted {
  		if err := os.MkdirAll(systemdControllerPath, 0700); err != nil {
  			return err
  		}
  		if err := m.Mount("cgroup", systemdControllerPath, "cgroup", 0, "none,name=systemd"); err != nil {
  			return errwrap.Wrap(fmt.Errorf("error mounting name=systemd hierarchy on %q", systemdControllerPath), err)
  		}
  	}
  
  	return nil
  }
docs: // mountHostV1Cgroups mounts the host v1 cgroup hierarchy as required by
  // systemd-nspawn. We need this because some distributions don't have the
  // "name=systemd" cgroup or don't mount the cgroup controllers in
  // "/sys/fs/cgroup", and systemd-nspawn needs this. Since this is mounted
  // inside the rkt mount namespace, it doesn't affect the host.