summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/print-tree.c
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@gmail.com>2014-01-11 22:28:54 +0100
committerChris Mason <clm@fb.com>2014-01-29 16:06:28 +0100
commit23c6bf6a91e96c17a452e07b12b38ed66504e799 (patch)
treec5955ef322a2034945408f873c0e6fa55af4e281 /fs/btrfs/print-tree.c
parentBtrfs: do not export ulist functions (diff)
downloadlinux-23c6bf6a91e96c17a452e07b12b38ed66504e799.tar.xz
linux-23c6bf6a91e96c17a452e07b12b38ed66504e799.zip
Btrfs: fix btrfs_search_slot_for_read backwards iteration
If the current path's leaf slot is 0, we do search for the previous leaf (via btrfs_prev_leaf) and set the new path's leaf slot to a value corresponding to the number of items - 1 of the former leaf. Fix this by using the slot set by btrfs_prev_leaf, decrementing it by 1 if it's equal to the leaf's number of items. Use of btrfs_search_slot_for_read() for backward iteration is used in particular by the send feature, which could miss items when the input leaf has less items than its previous leaf. This could be reproduced by running btrfs/007 from xfstests in a loop. Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/print-tree.c')
0 files changed, 0 insertions, 0 deletions