Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85026533 authored by Josef Bacik's avatar Josef Bacik
Browse files

Btrfs: return error if the range we want to map is bogus



Currently if we have corrupt metadata map_extent_buffer will complain about it,
but not return an error so the caller has no idea a problem was hit.  Fix this.
Thanks,

Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
parent 695a0d0d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3690,6 +3690,7 @@ int map_private_extent_buffer(struct extent_buffer *eb, unsigned long start,
		       "wanted %lu %lu\n", (unsigned long long)eb->start,
		       eb->len, start, min_len);
		WARN_ON(1);
		return -EINVAL;
	}

	p = extent_buffer_page(eb, i);