Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion storage/drivers/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,11 @@ func (d *Driver) Cleanup() error {
if anyPresent {
return nil
}
return mount.Unmount(d.home)
// Ensure that we do not unmount anything not mounted by us
if !d.options.skipMountHome {
return mount.Unmount(d.home)
}
return nil
}

// pruneStagingDirectories cleans up any staging directory that was leaked.
Expand Down