Move spec.Linux.IntelRdt check to spec.Linux != nil block

Signed-off-by: Jonathan Marler <johnnymarler@gmail.com>
This commit is contained in:
Jonathan Marler 2018-10-04 21:30:55 -06:00
parent 70ca035aa6
commit 1499c746a1
1 changed files with 6 additions and 6 deletions

View File

@ -239,6 +239,12 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
}
config.Seccomp = seccomp
}
if spec.Linux.IntelRdt != nil {
config.IntelRdt = &configs.IntelRdt{}
if spec.Linux.IntelRdt.L3CacheSchema != "" {
config.IntelRdt.L3CacheSchema = spec.Linux.IntelRdt.L3CacheSchema
}
}
}
if spec.Process.SelinuxLabel != "" {
config.ProcessLabel = spec.Process.SelinuxLabel
@ -257,12 +263,6 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
}
createHooks(spec, config)
config.Version = specs.Version
if spec.Linux.IntelRdt != nil {
config.IntelRdt = &configs.IntelRdt{}
if spec.Linux.IntelRdt.L3CacheSchema != "" {
config.IntelRdt.L3CacheSchema = spec.Linux.IntelRdt.L3CacheSchema
}
}
return config, nil
}