moby/volume
Paweł Gronowski 478f6b097d
volume: Don't decrement refcount below 0
With both rootless and live restore enabled, there's some race condition
which causes the container to be `Unmount`ed before the refcount is
restored.

This makes sure we don't underflow the refcount (uint64) when
decrementing it.

The root cause of this race condition still needs to be investigated and
fixed, but at least this unflakies the `TestLiveRestore`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit 294fc9762e)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-03-08 12:51:45 +01:00
..
drivers migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
local volume: Don't decrement refcount below 0 2024-03-08 12:51:45 +01:00
mounts volume: Don't decrement refcount below 0 2024-03-08 12:51:45 +01:00
service migrate to github.com/containerd/log v0.1.0 2023-10-11 17:52:23 +02:00
testutils linting: gosec: fix or suppress G112, G114 in test code 2022-09-04 15:36:51 +02:00
volume.go Restore active mount counts on live-restore 2023-06-27 16:33:23 +00:00