diff options
author | Marek BehĂșn <marek.behun@nic.cz> | 2018-07-04 20:23:01 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-07-20 15:37:44 -0400 |
commit | f8c173b6a0b7695089d5ec48cb5b320863c91fdf (patch) | |
tree | 0a3506445bea0ed84db77e574a2901d45a5d5d83 /include/env_default.h | |
parent | 25dabd730a534a93b585fe6623783e034399c68e (diff) | |
download | u-boot-f8c173b6a0b7695089d5ec48cb5b320863c91fdf.tar.gz |
fs: btrfs: Fix wrong comparison in logical to physical mapping
The comparison
logical > item->logical + item->length
in btrfs_map_logical_to_physical is wrong and should be instead
logical >= item->logical + item->length
For example, if
item->logical = 4096
item->length = 4096
and we are looking for logical = 8192, it is not part of item (item is
[4096, 8191]). But the comparison is false and we think we have found
the correct item, although we should be searing in the right subtree.
This fixes some bugs I encountered.
Signed-off-by: Marek Behun <marek.behun@nic.cz>
Diffstat (limited to 'include/env_default.h')
0 files changed, 0 insertions, 0 deletions