From 61cb58e549e5ff55095733bc3c7277c83584e5a0 Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Fri, 8 Jul 2016 22:28:50 +0100 Subject: [PATCH] libdm: use 'goto_bad' if extent pool allocation fails Generate a backtrace if unable to extend the extent table. --- libdm/libdm-stats.c | 4 ++-- 1 file 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) -- 2.43.5