moby/volume
Paweł Gronowski d1aa20efb7
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:56:41 +01:00
..
drivers golangci-lint: update to v1.49.0 2022-09-26 11:58:07 +02:00
local volume: Don't decrement refcount below 0 2024-03-08 12:56:41 +01:00
mounts volume: Don't decrement refcount below 0 2024-03-08 12:56:41 +01:00
service Restore active mount counts on live-restore 2023-06-28 09:52:08 +02:00
testutils linting: gosec: fix or suppress G112, G114 in test code 2022-09-06 15:11:42 +02:00
volume.go Restore active mount counts on live-restore 2023-06-28 09:52:08 +02:00