From: Miao Xie Date: Wed, 15 Jan 2014 12:00:57 +0000 (+0800) Subject: Btrfs: fix wrong block group in trace during the free space allocation X-Git-Tag: v3.14-rc2~3^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=89d4346a36a00ab1f9bd71f929564e9fc1c7c539;p=kernel%2Fkernel-generic.git Btrfs: fix wrong block group in trace during the free space allocation We allocate the free space from the former block group, not the current one, so should use the former one to output the trace information. Signed-off-by: Miao Xie Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index b55a4fd..73b55d9 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -6323,7 +6323,8 @@ have_block_group: /* we have a block, we're done */ spin_unlock(&last_ptr->refill_lock); trace_btrfs_reserve_extent_cluster(root, - block_group, search_start, num_bytes); + used_block_group, + search_start, num_bytes); if (used_block_group != block_group) { btrfs_put_block_group(block_group); block_group = used_block_group;