Merge pull request #5737 from thaJeztah/remove_redundant_check
runtime: runc v2: remove redundant validation
This commit is contained in:
commit
e830c5364c
@ -257,9 +257,6 @@ func (s *service) StartShim(ctx context.Context, opts shim.StartOpts) (_ string,
|
||||
if opts, ok := v.(*options.Options); ok {
|
||||
if opts.ShimCgroup != "" {
|
||||
if cgroups.Mode() == cgroups.Unified {
|
||||
if err := cgroupsv2.VerifyGroupPath(opts.ShimCgroup); err != nil {
|
||||
return "", errors.Wrapf(err, "failed to verify cgroup path %q", opts.ShimCgroup)
|
||||
}
|
||||
cg, err := cgroupsv2.LoadManager("/sys/fs/cgroup", opts.ShimCgroup)
|
||||
if err != nil {
|
||||
return "", errors.Wrapf(err, "failed to load cgroup %s", opts.ShimCgroup)
|
||||
|
Loading…
Reference in New Issue
Block a user