From: Josef Bacik Date: Wed, 8 May 2013 17:30:11 +0000 (-0400) Subject: Btrfs: don't null pointer deref on abort X-Git-Tag: MMI-PSA29.97-13-9~14064^2~86^2~20 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=69a85bd87cc81bcbd36730d4a1214c12fdb8a548;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 --- 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, 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);