]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix possible infinite loop in slow caching
authorJosef Bacik <jbacik@fusionio.com>
Fri, 19 Apr 2013 18:37:26 +0000 (14:37 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 6 May 2013 19:55:01 +0000 (15:55 -0400)
commit4a7f6a36c2253c23e57bfbbf5f2ba7ebf4b0d3a5
tree35106cf7f93687515e9bc90fdfeaf2a71b8b3277
parent9a4c6467dc409a442a80cfb6cb18ed2a628b4600
Btrfs: fix possible infinite loop in slow caching

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: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent-tree.c