From 1cc03c9a4afb8bc2932b508cc52fc1e7aabd13f4 Mon Sep 17 00:00:00 2001 From: edison Date: Mon, 20 Dec 2010 18:07:10 -0800 Subject: [PATCH] don't see why we need this code, so remove it --- .../storage/allocator/FirstFitStoragePoolAllocator.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/server/src/com/cloud/storage/allocator/FirstFitStoragePoolAllocator.java b/server/src/com/cloud/storage/allocator/FirstFitStoragePoolAllocator.java index f5c1e5eb792..731bb2ec0b3 100644 --- a/server/src/com/cloud/storage/allocator/FirstFitStoragePoolAllocator.java +++ b/server/src/com/cloud/storage/allocator/FirstFitStoragePoolAllocator.java @@ -66,8 +66,6 @@ public class FirstFitStoragePoolAllocator extends AbstractStoragePoolAllocator { for (StoragePoolVO pool: pools) { if (checkPool(avoid, pool, dskCh, template, null, vm, sc)) { return pool; - } else { - pools.remove(pool); } } @@ -75,10 +73,6 @@ public class FirstFitStoragePoolAllocator extends AbstractStoragePoolAllocator { s_logger.debug("Unable to find any storage pool"); } - if (_dontMatter && pools.size() > 0) { - return pools.get(0); - } else { - return null; - } + return null; } }