From 5d3b136d38db40a6d26b8a09e7a4b504fa2f85d1 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Wed, 6 Jul 2016 09:04:13 +0100 Subject: [PATCH] libdm: restore missing braces in _stats_walk_end_areas Jumping to the end of the region table must only happen if there are no more present, non-skipped regions, and no group walk is configured to begin. --- libdm/libdm-stats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 07503a5dc..057bbcc7b 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -1479,11 +1479,12 @@ static void _stats_walk_end_areas(const struct dm_stats *dms, uint64_t *flags, *cur_a = DM_STATS_WALK_REGION; *cur_r = DM_STATS_REGION_NOT_PRESENT; _stats_walk_next_present(dms, flags, cur_r, cur_a, cur_g); - if (!_stats_walk_any_unskipped(dms, flags, cur_r, cur_a)) + if (!_stats_walk_any_unskipped(dms, flags, cur_r, cur_a)) { /* no more regions */ *flags &= ~DM_STATS_WALK_REGION; if (!(*flags & DM_STATS_WALK_GROUP)) *cur_r = dms->max_region; + } } if (*flags & DM_STATS_WALK_REGION)