Skip to content

Commit e40d463

Browse files
committed
merge branch 'pr-1894'
Move spec.Linux.IntelRdt check to spec.Linux != nil block LGTMs: @crosbymichael @cyphar Closes opencontainers#1894
2 parents 2abd837 + 1499c74 commit e40d463

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libcontainer/specconv/spec_linux.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,12 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
239239
}
240240
config.Seccomp = seccomp
241241
}
242+
if spec.Linux.IntelRdt != nil {
243+
config.IntelRdt = &configs.IntelRdt{}
244+
if spec.Linux.IntelRdt.L3CacheSchema != "" {
245+
config.IntelRdt.L3CacheSchema = spec.Linux.IntelRdt.L3CacheSchema
246+
}
247+
}
242248
}
243249
if spec.Process.SelinuxLabel != "" {
244250
config.ProcessLabel = spec.Process.SelinuxLabel
@@ -257,12 +263,6 @@ func CreateLibcontainerConfig(opts *CreateOpts) (*configs.Config, error) {
257263
}
258264
createHooks(spec, config)
259265
config.Version = specs.Version
260-
if spec.Linux.IntelRdt != nil {
261-
config.IntelRdt = &configs.IntelRdt{}
262-
if spec.Linux.IntelRdt.L3CacheSchema != "" {
263-
config.IntelRdt.L3CacheSchema = spec.Linux.IntelRdt.L3CacheSchema
264-
}
265-
}
266266
return config, nil
267267
}
268268

0 commit comments

Comments
 (0)