Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc7c1077 authored by Alexandre Oliva's avatar Alexandre Oliva Committed by Chris Mason
Browse files

Btrfs: don't set up allocation result twice



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: default avatarAlexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent a5f6f719
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -5441,9 +5441,6 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans,
			goto loop;
			goto loop;
		}
		}


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

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