Unverified Commit 1b2e5bdd authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6877 maple_tree: avoid checking other gaps after getting the largest gap

parents 0993c620 6e1b6d0d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1547,6 +1547,9 @@ static unsigned long mas_leaf_max_gap(struct ma_state *mas)
		gap = ULONG_MAX - pivots[max_piv];
		if (gap > max_gap)
			max_gap = gap;

		if (max_gap > pivots[max_piv] - mas->min)
			return max_gap;
	}

	for (; i <= max_piv; i++) {