]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: init relocate extent_io_tree with a mapping
authorJosef Bacik <jbacik@fusionio.com>
Fri, 31 May 2013 17:04:36 +0000 (13:04 -0400)
committerChris Mason <chris.mason@fusionio.com>
Sat, 8 Jun 2013 19:07:53 +0000 (15:07 -0400)
commitbbe1546930c4a96b244c53f0ec9cb9149dc9e56c
tree1dab3bca657f98015fed634bf08e2cc9742741f6
parent4d42cf7a26fcb08415bc4a3ae306edb0e41f4a68
Btrfs: init relocate extent_io_tree with a mapping

Dave reported a NULL pointer deref.  This is caused because he thought he'd be
smart and add sanity checks to the extent_io bit operations, but he didn't
expect a tree to have a NULL mapping.  To fix this we just need to init the
relocation's processed_blocks with the btree_inode->i_mapping.  Thanks,

Reported-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/relocation.c