Skip to content

Commit

Permalink
runtime: Restore rLockSandbox function
Browse files Browse the repository at this point in the history
This function was removed as part of a cleanup by Peng Tao
in commit 74192d1.
It is used by some of the APIs we are trying to recover in order to restore
podman functionality

Fixes: kata-containers#722

Signed-off-by: Christophe de Dinechin <dinechin@redhat.com>
  • Loading branch information
c3d committed Nov 16, 2021
1 parent 69811c7 commit 6b7a398
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/runtime/virtcontainers/sandbox.go
Expand Up @@ -695,6 +695,15 @@ func (s *Sandbox) storeSandbox(ctx context.Context) error {
return nil
}

func rLockSandbox(sandboxID string) (func() error, error) {
store, err := persist.GetDriver()
if err != nil {
return nil, fmt.Errorf("failed to get fs persist driver: %v", err)
}

return store.Lock(sandboxID, false)
}

func rwLockSandbox(sandboxID string) (func() error, error) {
store, err := persist.GetDriver()
if err != nil {
Expand Down

0 comments on commit 6b7a398

Please sign in to comment.