]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: use correct key when repeating search for extent item
authorFilipe Manana <fdmanana@gmail.com>
Thu, 24 Apr 2014 14:15:28 +0000 (15:15 +0100)
committerChris Mason <clm@fb.com>
Thu, 24 Apr 2014 23:43:33 +0000 (16:43 -0700)
commit007bfdb02169b3206db1709ab4bb81101394a5b0
treeb7abb6948560dbe6f21af61bdd62d90be7b3735e
parent7d9b95ee39eba0ad8d81c9e5fd813f44437014c0
Btrfs: use correct key when repeating search for extent item

If skinny metadata is enabled and our first tree search fails to find a
skinny extent item, we may repeat a tree search for a "fat" extent item
(if the previous item in the leaf is not the "fat" extent we're looking
for). However we were not setting the new key's objectid to the right
value, as we previously used the same key variable to peek at the previous
item in the leaf, which has a different objectid. So just set the right
objectid to avoid modifying/deleting a wrong item if we repeat the tree
search.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent-tree.c