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
}
id = layer.ID
// This check is needed for idempotency of delete where the layer could have been
// already unmounted (since c/storage gives you that API directly)
// The layer may already have been explicitly unmounted, but if not, we
// should try to clean that up before we start deleting anything at the
// driver level.
for layer.MountCount > 0 {
if _, err := r.Unmount(id, false); err != nil {
return err