Permalink
Browse files

fix crash in extents_selector()

  • Loading branch information...
1 parent a18914e commit 9b4211e1ad80a6e3ad376e2b360094340e78f420 @tomato42 committed Aug 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 volumes.c
View
2 volumes.c
@@ -64,7 +64,7 @@ int extents_selector(struct extent_stats *es, struct extents **ret,
// max_extents to ret
for(ssize_t i=(hot_cold == ES_HOT)?0:es->length-1;
(hot_cold == ES_HOT && i < es->length && (*ret)->length < max_extents)
- || (i >= 0 && (*ret)->length < max_extents);
+ || (hot_cold == ES_COLD && i >= 0 && (*ret)->length < max_extents);
i = (hot_cold == ES_HOT)?i+1:i-1) {
int tier = get_extent_tier(pp, lv_name, &es->extents[i]);

0 comments on commit 9b4211e

Please sign in to comment.