Skip to content

Commit 4b37cd9

Browse files
lifubangcyphar
authored andcommitted
libct: align param type for mountCgroupV1/V2 functions
Signed-off-by: lifubang <[email protected]>
1 parent d61fd29 commit 4b37cd9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcontainer/rootfs_linux.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ func cleanupTmp(tmpdir string) {
297297
_ = os.RemoveAll(tmpdir)
298298
}
299299

300-
func mountCgroupV1(m *configs.Mount, c *mountConfig) error {
301-
binds, err := getCgroupMounts(m)
300+
func mountCgroupV1(m mountEntry, c *mountConfig) error {
301+
binds, err := getCgroupMounts(m.Mount)
302302
if err != nil {
303303
return err
304304
}
@@ -368,7 +368,7 @@ func mountCgroupV1(m *configs.Mount, c *mountConfig) error {
368368
return nil
369369
}
370370

371-
func mountCgroupV2(m *configs.Mount, c *mountConfig) error {
371+
func mountCgroupV2(m mountEntry, c *mountConfig) error {
372372
err := utils.WithProcfd(c.root, m.Destination, func(dstFd string) error {
373373
return mountViaFds(m.Source, nil, m.Destination, dstFd, "cgroup2", uintptr(m.Flags), m.Data)
374374
})
@@ -739,9 +739,9 @@ func mountToRootfs(c *mountConfig, m mountEntry) error {
739739
return setRecAttr(m.Mount, rootfs)
740740
case "cgroup":
741741
if cgroups.IsCgroup2UnifiedMode() {
742-
return mountCgroupV2(m.Mount, c)
742+
return mountCgroupV2(m, c)
743743
}
744-
return mountCgroupV1(m.Mount, c)
744+
return mountCgroupV1(m, c)
745745
default:
746746
return mountPropagate(m, rootfs, mountLabel)
747747
}

0 commit comments

Comments
 (0)