Update a comment

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2019-02-20 14:05:49 -05:00
parent 1194eb9848
commit 45c05928c4
1 changed files with 3 additions and 2 deletions

View File

@ -862,8 +862,9 @@ func (r *layerStore) Delete(id string) error {
return ErrLayerUnknown return ErrLayerUnknown
} }
id = layer.ID id = layer.ID
// This check is needed for idempotency of delete where the layer could have been // The layer may already have been explicitly unmounted, but if not, we
// already unmounted (since c/storage gives you that API directly) // should try to clean that up before we start deleting anything at the
// driver level.
for layer.MountCount > 0 { for layer.MountCount > 0 {
if _, err := r.Unmount(id, false); err != nil { if _, err := r.Unmount(id, false); err != nil {
return err return err