Skip to content

Commit e3ecabe

Browse files
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
1 parent f868444 commit e3ecabe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2874,7 +2874,7 @@ protected void verifyVmLimits(UserVmVO vmInstance, Map<String, String> details)
28742874
}
28752875
if (newGpu > currentGpu) {
28762876
_resourceLimitMgr.incrementVmGpuResourceCount(owner.getAccountId(), vmInstance.isDisplay(), svcOffering, template, newGpu - currentGpu);
2877-
} else if (newGpu > 0 && currentGpu > newGpu){
2877+
} else if (currentGpu > newGpu) {
28782878
_resourceLimitMgr.decrementVmGpuResourceCount(owner.getAccountId(), vmInstance.isDisplay(), svcOffering, template, currentGpu - newGpu);
28792879
}
28802880
} catch (ResourceAllocationException e) {

0 commit comments

Comments
 (0)