Skip to content

Commit

Permalink
cache: Remove mutex support as it is not needed
Browse files Browse the repository at this point in the history
No one uses the mutex in cache object so it can be removed.
Can be reintroduced if fine grained locking is needed there.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
  • Loading branch information
jukkar committed May 26, 2023
1 parent 36c1a75 commit 76511a6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/resmgr/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"os"
"path/filepath"
"strings"
"sync"

nri "github.com/containerd/nri/pkg/api"
v1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -435,8 +434,7 @@ var (

// Our cache of objects.
type cache struct {
sync.Mutex `json:"-"` // we're lockable
dataDir string // container data directory
dataDir string // container data directory

Pods map[string]*pod // known/cached pods
Containers map[string]*container // known/cache containers
Expand Down

0 comments on commit 76511a6

Please sign in to comment.