Skip to content
Commit 633967f9 authored by Pierre Bourdon's avatar Pierre Bourdon Committed by Tom Rini
Browse files

fs: btrfs: fix false negatives in ROOT_ITEM search



ROOT_ITEMs in btrfs are referenced without knowing their actual "offset"
value. To perform these searches using only two items from the key, the
btrfs driver uses a special "btrfs_search_tree_key_type" function.

The algorithm used by that function to transform a 3-tuple search into a
2-tuple search was subtly broken, leading to items not being found if
they were the first in their tree node.

This commit fixes btrfs_search_tree_key_type to properly behave in these
situations.

Signed-off-by: default avatarPierre Bourdon <delroth@gmail.com>
Cc: Marek Behun <marek.behun@nic.cz>
parent 74ee9dc5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment