Skip to content

Commit

Permalink
Ensure noLockPod actually works
Browse files Browse the repository at this point in the history
I'm not sure how things worked without this being wired in, which
concerns me a bit...

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
  • Loading branch information
mheon committed May 8, 2023
1 parent 078335c commit 165f62e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libpod/runtime_ctr.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,10 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo
retErr = fmt.Errorf("container %s and pod %s share lock ID %d: %w", c.ID(), pod.ID(), c.config.LockID, define.ErrWillDeadlock)
return
}
pod.lock.Lock()
defer pod.lock.Unlock()
if !noLockPod {
pod.lock.Lock()
defer pod.lock.Unlock()
}
if err := pod.updatePod(); err != nil {
retErr = err
return
Expand Down

0 comments on commit 165f62e

Please sign in to comment.