mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
libct: simplify setIOPriority/setupScheduler calls
Move the nil check inside, simplifying the callers. Fixes:bfbd0305("Add I/O priority") Fixes:770728e1("Support `process.scheduler`") Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -662,6 +662,9 @@ func setupRlimits(limits []configs.Rlimit, pid int) error {
|
||||
}
|
||||
|
||||
func setupScheduler(config *configs.Config) error {
|
||||
if config.Scheduler == nil {
|
||||
return nil
|
||||
}
|
||||
attr, err := configs.ToSchedAttr(config.Scheduler)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user