Skip to content

Commit

Permalink
Btrfs: don't set up allocation result twice
Browse files Browse the repository at this point in the history
We store the allocation start and length twice in ins, once right
after the other, but with intervening calls that may prevent the
duplicate from being optimized out by the compiler.  Remove one of the
assignments.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Alexandre Oliva authored and Chris Mason committed Jan 8, 2012
1 parent a5f6f71 commit fc7c107
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -5441,9 +5441,6 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
goto loop;
}

ins->objectid = search_start;
ins->offset = num_bytes;

if (offset < search_start)
btrfs_add_free_space(used_block_group, offset,
search_start - offset);
Expand Down

0 comments on commit fc7c107

Please sign in to comment.