Skip to content

Commit aa9e48a

Browse files
eahydralucming
authored andcommitted
clean: resolve vet error (koordinator-sh#970)
Signed-off-by: Joseph <joseph.t.lee@outlook.com>
1 parent b06ae4a commit aa9e48a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/scheduler/plugins/deviceshare/plugin.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func (p *Plugin) Filter(ctx context.Context, cycleState *framework.CycleState, p
157157
nodeDeviceInfo.lock.RLock()
158158
defer nodeDeviceInfo.lock.RUnlock()
159159

160-
allocateResult, err := g.allocator.Allocate(nodeInfo.Node().Name, pod, podRequest, nodeDeviceInfo)
160+
allocateResult, err := p.allocator.Allocate(nodeInfo.Node().Name, pod, podRequest, nodeDeviceInfo)
161161
if len(allocateResult) != 0 && err == nil {
162162
return nil
163163
}
@@ -184,11 +184,11 @@ func (p *Plugin) Reserve(ctx context.Context, cycleState *framework.CycleState,
184184
nodeDeviceInfo.lock.Lock()
185185
defer nodeDeviceInfo.lock.Unlock()
186186

187-
allocateResult, err := g.allocator.Allocate(nodeName, pod, podRequest, nodeDeviceInfo)
187+
allocateResult, err := p.allocator.Allocate(nodeName, pod, podRequest, nodeDeviceInfo)
188188
if err != nil || len(allocateResult) == 0 {
189189
return framework.NewStatus(framework.Unschedulable, ErrInsufficientDevices)
190190
}
191-
g.allocator.Reserve(pod, nodeDeviceInfo, allocateResult)
191+
p.allocator.Reserve(pod, nodeDeviceInfo, allocateResult)
192192

193193
state.allocationResult = allocateResult
194194
return nil
@@ -211,7 +211,7 @@ func (p *Plugin) Unreserve(ctx context.Context, cycleState *framework.CycleState
211211
nodeDeviceInfo.lock.Lock()
212212
defer nodeDeviceInfo.lock.Unlock()
213213

214-
g.allocator.Unreserve(pod, nodeDeviceInfo, state.allocationResult)
214+
p.allocator.Unreserve(pod, nodeDeviceInfo, state.allocationResult)
215215
state.allocationResult = nil
216216
}
217217

0 commit comments

Comments
 (0)