From 82bdd88e9c9db40ee8072f7c4c2832dfb3f73823 Mon Sep 17 00:00:00 2001 From: Alexandr Morozov Date: Fri, 12 Sep 2014 11:44:25 +0400 Subject: [PATCH] Use unlocked version of changes for GetImage Fixes #7999 Signed-off-by: Alexandr Morozov --- daemon/container.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemon/container.go b/daemon/container.go index d33721af16..e45ec68d52 100644 --- a/daemon/container.go +++ b/daemon/container.go @@ -686,10 +686,14 @@ func (container *Container) Mount() error { return container.daemon.Mount(container) } +func (container *Container) changes() ([]archive.Change, error) { + return container.daemon.Changes(container) +} + func (container *Container) Changes() ([]archive.Change, error) { container.Lock() defer container.Unlock() - return container.daemon.Changes(container) + return container.changes() } func (container *Container) GetImage() (*image.Image, error) { @@ -759,7 +763,7 @@ func (container *Container) GetSize() (int64, int64) { sizeRw = -1 } } else { - changes, _ := container.Changes() + changes, _ := container.changes() if changes != nil { sizeRw = archive.ChangesSize(container.basefs, changes) } else {