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

Commit db34be19 authored by Liu Bo's avatar Liu Bo Committed by David Sterba
Browse files

Btrfs: remove redundant check in rbio_can_merge



Given the above
'
if (last->operation != cur->operation)
	return 0;
',
it's guaranteed that two operations are same.

Signed-off-by: default avatarLiu Bo <bo.li.liu@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 05a5c55d
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -594,12 +594,10 @@ static int rbio_can_merge(struct btrfs_raid_bio *last,
	 * bio list here, anyone else that wants to
	 * change this stripe needs to do their own rmw.
	 */
	if (last->operation == BTRFS_RBIO_PARITY_SCRUB ||
	    cur->operation == BTRFS_RBIO_PARITY_SCRUB)
	if (last->operation == BTRFS_RBIO_PARITY_SCRUB)
		return 0;

	if (last->operation == BTRFS_RBIO_REBUILD_MISSING ||
	    cur->operation == BTRFS_RBIO_REBUILD_MISSING)
	if (last->operation == BTRFS_RBIO_REBUILD_MISSING)
		return 0;

	return 1;