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

Commit 0966f303 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "pft: fix pft_allow_merge_bio() to check if key is loaded"

parents ab98bd1e 323195c9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -805,6 +805,13 @@ bool pft_allow_merge_bio(struct bio *bio1, struct bio *bio2)
	if (!pft_is_ready())
		return true;

	/*
	 * Encrypted BIOs are created only when file encryption is enabled,
	 * which happens only when key is loaded.
	 */
	if (pft_dev->state != PFT_STATE_KEY_LOADED)
		return true;

	ret = pft_get_key_index(bio1, &key_index1,
				&is_encrypted1, &is_inplace);
	if (ret)