diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-05-08 13:30:11 -0400 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-17 21:40:12 -0400 |
commit | 69a85bd87cc81bcbd36730d4a1214c12fdb8a548 (patch) | |
tree | be462401400f8df123ba89296c300d95fb804fc2 /fs | |
parent | 03b71c6ca6286625d8f1ed44aabab9b5bf5dac10 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/disk-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 72b17276c255..e8b29da30154 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -3808,7 +3808,7 @@ static int btrfs_destroy_marked_extents(struct btrfs_root *root, | |||
3808 | while (start <= end) { | 3808 | while (start <= end) { |
3809 | eb = btrfs_find_tree_block(root, start, | 3809 | eb = btrfs_find_tree_block(root, start, |
3810 | root->leafsize); | 3810 | root->leafsize); |
3811 | start += eb->len; | 3811 | start += root->leafsize; |
3812 | if (!eb) | 3812 | if (!eb) |
3813 | continue; | 3813 | continue; |
3814 | wait_on_extent_buffer_writeback(eb); | 3814 | wait_on_extent_buffer_writeback(eb); |