]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Btrfs: don't set up allocation result twice
authorAlexandre Oliva <lxoliva@fsfla.org>
Mon, 28 Nov 2011 14:36:17 +0000 (12:36 -0200)
committerGuru Anbalagane <guru.anbalagane@oracle.com>
Fri, 27 Jan 2012 01:20:31 +0000 (17:20 -0800)
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>
(cherry picked from commit fc7c1077ceb99c35e5f9d0ce03dc7740565bb2bf)

fs/btrfs/extent-tree.c

index a11b7b713cc1d21a92bcab95fffed7e59a1acc3c..6ebe2d414c2eed2606fd33e98b964b033d358ff9 100644 (file)
@@ -5440,9 +5440,6 @@ checks:
                        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);