diff options
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index a85cf7d23309..362879da4f0d 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -1771,6 +1771,14 @@ static noinline int generic_bin_search(struct extent_buffer *eb, | |||
1771 | unsigned long map_len = 0; | 1771 | unsigned long map_len = 0; |
1772 | int err; | 1772 | int err; |
1773 | 1773 | ||
1774 | if (low > high) { | ||
1775 | btrfs_err(eb->fs_info, | ||
1776 | "%s: low (%d) > high (%d) eb %llu owner %llu level %d", | ||
1777 | __func__, low, high, eb->start, | ||
1778 | btrfs_header_owner(eb), btrfs_header_level(eb)); | ||
1779 | return -EINVAL; | ||
1780 | } | ||
1781 | |||
1774 | while (low < high) { | 1782 | while (low < high) { |
1775 | mid = (low + high) / 2; | 1783 | mid = (low + high) / 2; |
1776 | offset = p + mid * item_size; | 1784 | offset = p + mid * item_size; |