Btrfs: don't null pointer deref on abort

I'm sorry, theres no excuse for this sort of work.  We need to use
root->leafsize since eb may be NULL.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
This commit is contained in:
Josef Bacik 2013-05-08 13:30:11 -04:00
parent 03b71c6ca6
commit 69a85bd87c

View file

@ -3808,7 +3808,7 @@ static int btrfs_destroy_marked_extents(struct btrfs_root *root,
while (start <= end) { while (start <= end) {
eb = btrfs_find_tree_block(root, start, eb = btrfs_find_tree_block(root, start,
root->leafsize); root->leafsize);
start += eb->len; start += root->leafsize;
if (!eb) if (!eb)
continue; continue;
wait_on_extent_buffer_writeback(eb); wait_on_extent_buffer_writeback(eb);