aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/fsmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/fsmap.c')
-rw-r--r--fs/ext4/fsmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/fsmap.c b/fs/ext4/fsmap.c
index 7ec340898598..1a4d42a1b161 100644
--- a/fs/ext4/fsmap.c
+++ b/fs/ext4/fsmap.c
@@ -121,6 +121,9 @@ static int ext4_getfsmap_helper(struct super_block *sb,
/* Are we just counting mappings? */
if (info->gfi_head->fmh_count == 0) {
+ if (info->gfi_head->fmh_entries == UINT_MAX)
+ return EXT4_QUERY_RANGE_ABORT;
+
if (rec_fsblk > info->gfi_next_fsblk)
info->gfi_head->fmh_entries++;