Skip to content

Commit 348a11e

Browse files
committed
storage: simplify ApplyDiff() in overlay driver
It is not clear to me when it will hit the code path there, by normal layer creation we always pass a valid parent so this branch is never reached AFAICT. Let's remove it and see if all tests still pass in podman, buildah and others... Signed-off-by: Paul Holzinger <[email protected]>
1 parent 164637c commit 348a11e

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

storage/drivers/overlay/overlay.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2371,16 +2371,6 @@ func (d *Driver) DifferTarget(id string) (string, error) {
23712371

23722372
// ApplyDiff applies the new layer into a root
23732373
func (d *Driver) ApplyDiff(id, parent string, options graphdriver.ApplyDiffOpts) (size int64, err error) {
2374-
if !d.isParent(id, parent) {
2375-
if d.options.ignoreChownErrors {
2376-
options.IgnoreChownErrors = d.options.ignoreChownErrors
2377-
}
2378-
if d.options.forceMask != nil {
2379-
options.ForceMask = d.options.forceMask
2380-
}
2381-
return d.naiveDiff.ApplyDiff(id, parent, options)
2382-
}
2383-
23842374
idMappings := options.Mappings
23852375
if idMappings == nil {
23862376
idMappings = &idtools.IDMappings{}

0 commit comments

Comments
 (0)