]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Btrfs: don't null pointer deref on abort
authorJosef Bacik <jbacik@fusionio.com>
Wed, 8 May 2013 17:30:11 +0000 (13:30 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Sat, 18 May 2013 01:40:12 +0000 (21:40 -0400)
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>
fs/btrfs/disk-io.c

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