mirror of
https://github.com/containers/podman.git
synced 2025-10-18 03:33:32 +08:00
Do not make renumber shut down the runtime
The original intent behind the requirement was to ensure that, if two SHM lock structs were open at the same time, we should not make such a runtime available to the user, and should clean it up instead. It turns out that we don't even need to open a second SHM lock struct - if we get an error mapping the first one due to a lock count mismatch, we can just delete it, and it cleans itself up when it errors. So there's no reason not to return a valid runtime. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -71,7 +71,9 @@ func (m *SHMLockManager) RetrieveLock(id uint32) (Locker, error) {
|
||||
return lock, nil
|
||||
}
|
||||
|
||||
// FreeAllLocks frees all locks in the manager
|
||||
// FreeAllLocks frees all locks in the manager.
|
||||
// This function is DANGEROUS. Please read the full comment in locks.go before
|
||||
// trying to use it.
|
||||
func (m *SHMLockManager) FreeAllLocks() error {
|
||||
return m.locks.DeallocateAllSemaphores()
|
||||
}
|
||||
|
Reference in New Issue
Block a user