mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct: mountCgroupV1: address TODO
Indeed, it does not make sense to prepend c.root once we started using MkdirAllInRoot in commit63c29081. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> (cherry picked from commit60352524d3) Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -336,10 +336,8 @@ func mountCgroupV1(m mountEntry, c *mountConfig) error {
|
|||||||
// We just created the tmpfs, and so we can just use filepath.Join
|
// We just created the tmpfs, and so we can just use filepath.Join
|
||||||
// here (not to mention we want to make sure we create the path
|
// here (not to mention we want to make sure we create the path
|
||||||
// inside the tmpfs, so we don't want to resolve symlinks).
|
// inside the tmpfs, so we don't want to resolve symlinks).
|
||||||
// TODO: Why not just use b.Destination (c.root is the root here)?
|
|
||||||
subsystemPath := filepath.Join(c.root, b.Destination)
|
|
||||||
subsystemName := filepath.Base(b.Destination)
|
subsystemName := filepath.Base(b.Destination)
|
||||||
subsystemDir, err := pathrs.MkdirAllInRoot(c.root, subsystemPath, 0o755)
|
subsystemDir, err := pathrs.MkdirAllInRoot(c.root, b.Destination, 0o755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user