• Josef Bacik's avatar
    Btrfs: fix possible infinite loop in slow caching · 0a3896d0
    Josef Bacik authored
    So I noticed there is an infinite loop in the slow caching code.  If we return 1
    when we hit the end of the tree, so we could end up caching the last block group
    the slow way and suddenly we're looping forever because we just keep
    re-searching and trying again.  Fix this by only doing btrfs_next_leaf() if we
    don't need_resched().  Thanks,
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    0a3896d0
extent-tree.c 229 KB