summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tests
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2018-03-26 23:59:12 +0100
committerDavid Sterba <dsterba@suse.com>2018-03-31 02:01:05 +0200
commit8434ec46c6e3232cebc25a910363b29f5c617820 (patch)
treeef8cc9bf2cc3964cbb10f39993aeb26c1582b7ff /fs/btrfs/tests
parent4ee3fad34a9cc2cf33303dfbd0cf554248651c86 (diff)
downloadlinux-8434ec46c6e3232cebc25a910363b29f5c617820.tar.gz
linux-8434ec46c6e3232cebc25a910363b29f5c617820.tar.bz2
linux-8434ec46c6e3232cebc25a910363b29f5c617820.zip
Btrfs: fix copy_items() return value when logging an inode
When logging an inode, at tree-log.c:copy_items(), if we call btrfs_next_leaf() at the loop which checks for the need to log holes, we need to make sure copy_items() returns the value 1 to its caller and not 0 (on success). This is because the path the caller passed was released and is now different from what is was before, and the caller expects a return value of 0 to mean both success and that the path has not changed, while a return value of 1 means both success and signals the caller that it can not reuse the path, it has to perform another tree search. Even though this is a case that should not be triggered on normal circumstances or very rare at least, its consequences can be very unpredictable (especially when replaying a log tree). Fixes: 16e7549f045d ("Btrfs: incompatible format change to remove hole extents") Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests')
0 files changed, 0 insertions, 0 deletions