summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2016-07-08 22:28:50 +0100
committerBryn M. Reeves <bmr@redhat.com>2016-07-08 22:28:50 +0100
commit61cb58e549e5ff55095733bc3c7277c83584e5a0 (patch)
tree7090131491b491aed791ead1128a46fa9339125b
parentfeb69966d404346208f460f2b5c45d85783cc1ce (diff)
downloadlvm2-61cb58e549e5ff55095733bc3c7277c83584e5a0.tar.gz
libdm: use 'goto_bad' if extent pool allocation fails
Generate a backtrace if unable to extend the extent table.
-rw-r--r--libdm/libdm-stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index a5358bf5f..612f9bff8 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -4208,7 +4208,7 @@ static struct _extent *_stats_get_extents_for_file(struct dm_pool *mem, int fd,
tot_extents++;
if (!_stats_add_extent(mem, fm_ext + i,
tot_extents - 1))
- goto bad;
+ goto_bad;
} else {
expected = 0;
if (!tot_extents)
@@ -4216,7 +4216,7 @@ static struct _extent *_stats_get_extents_for_file(struct dm_pool *mem, int fd,
if (fm_ext[i].fe_logical == 0)
if (!_stats_add_extent(mem, fm_ext + i,
tot_extents - 1))
- goto bad;
+ goto_bad;
}
num += tot_extents;
if (fm_ext[i].fe_flags & FIEMAP_EXTENT_LAST)