libct/cg/fs: rename join to apply

As this is called from the Apply() method, it's a natural name.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-08-10 13:10:19 -07:00
parent 5c7cb837c7
commit 7d1cb320ad
13 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ func (s *BlkioGroup) Name() string {
}
func (s *BlkioGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *BlkioGroup) Set(path string, r *configs.Resources) error {
+1 -1
View File
@@ -35,7 +35,7 @@ func (s *CpuacctGroup) Name() string {
}
func (s *CpuacctGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *CpuacctGroup) Set(_ string, _ *configs.Resources) error {
+1 -1
View File
@@ -29,7 +29,7 @@ func (s *DevicesGroup) Apply(path string, d *cgroupData) error {
// is a hard requirement for container's security.
return errSubsystemDoesNotExist
}
return join(path, d.pid)
return apply(path, d.pid)
}
func loadEmulator(path string) (*cgroupdevices.Emulator, error) {
+1 -1
View File
@@ -20,7 +20,7 @@ func (s *FreezerGroup) Name() string {
}
func (s *FreezerGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *FreezerGroup) Set(path string, r *configs.Resources) (Err error) {
+1 -1
View File
@@ -15,7 +15,7 @@ func (s *HugetlbGroup) Name() string {
}
func (s *HugetlbGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *HugetlbGroup) Set(path string, r *configs.Resources) error {
+1 -1
View File
@@ -31,7 +31,7 @@ func (s *MemoryGroup) Name() string {
}
func (s *MemoryGroup) Apply(path string, d *cgroupData) (err error) {
return join(path, d.pid)
return apply(path, d.pid)
}
func setMemory(path string, val int64) error {
+1 -1
View File
@@ -17,7 +17,7 @@ func (s *NameGroup) Name() string {
func (s *NameGroup) Apply(path string, d *cgroupData) error {
if s.Join {
// ignore errors if the named cgroup does not exist
_ = join(path, d.pid)
_ = apply(path, d.pid)
}
return nil
}
+1 -1
View File
@@ -14,7 +14,7 @@ func (s *NetClsGroup) Name() string {
}
func (s *NetClsGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *NetClsGroup) Set(path string, r *configs.Resources) error {
+1 -1
View File
@@ -12,7 +12,7 @@ func (s *NetPrioGroup) Name() string {
}
func (s *NetPrioGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *NetPrioGroup) Set(path string, r *configs.Resources) error {
+1 -1
View File
@@ -162,7 +162,7 @@ func (raw *cgroupData) path(subsystem string) (string, error) {
return filepath.Join(parentPath, raw.innerPath), nil
}
func join(path string, pid int) error {
func apply(path string, pid int) error {
if path == "" {
return nil
}
+1 -1
View File
@@ -12,7 +12,7 @@ func (s *PerfEventGroup) Name() string {
}
func (s *PerfEventGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *PerfEventGroup) Set(_ string, _ *configs.Resources) error {
+1 -1
View File
@@ -16,7 +16,7 @@ func (s *PidsGroup) Name() string {
}
func (s *PidsGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *PidsGroup) Set(path string, r *configs.Resources) error {
+1 -1
View File
@@ -13,7 +13,7 @@ func (s *RdmaGroup) Name() string {
}
func (s *RdmaGroup) Apply(path string, d *cgroupData) error {
return join(path, d.pid)
return apply(path, d.pid)
}
func (s *RdmaGroup) Set(path string, r *configs.Resources) error {