From dd97134232b8ab58ca06369322ae74164affb86d Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 23 Mar 2021 15:12:03 +0900 Subject: [PATCH] overlay2: call d.naiveDiff.ApplyDiff when useNaiveDiff==true Previously, `d.naiveDiff.ApplyDiff` was not used even when `useNaiveDiff()==true` Signed-off-by: Akihiro Suda --- daemon/graphdriver/overlay2/overlay.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/graphdriver/overlay2/overlay.go b/daemon/graphdriver/overlay2/overlay.go index 38ce92caf7..64b0697de9 100644 --- a/daemon/graphdriver/overlay2/overlay.go +++ b/daemon/graphdriver/overlay2/overlay.go @@ -678,7 +678,7 @@ func (d *Driver) isParent(id, parent string) bool { // ApplyDiff applies the new layer into a root func (d *Driver) ApplyDiff(id string, parent string, diff io.Reader) (size int64, err error) { - if !d.isParent(id, parent) { + if useNaiveDiff(d.home) || !d.isParent(id, parent) { return d.naiveDiff.ApplyDiff(id, parent, diff) }