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

Commit 8726b321 authored by Dinesh K Garg's avatar Dinesh K Garg
Browse files

md: dm-req-crypt: Remove few extra checks from write request path



When a request is completed, it frees up req_io to pool. For write
req, it performs few extra checks in a loop. These extra checks are
not required for inline encryption.

Change-Id: I685628bb3be83ec2691db9b1e2147e69a2498b96
Signed-off-by: default avatarDinesh K Garg <dineshg@codeaurora.org>
parent 8ca03863
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -870,9 +870,8 @@ static int req_crypt_endio(struct dm_target *ti, struct request *clone,
	struct bio_vec bvec;
	struct req_dm_crypt_io *req_io = map_context->ptr;

	/* If it is a write request, do nothing just return. */
	if (encryption_mode == DM_REQ_CRYPT_ENCRYPTION_MODE_TRANSPARENT
		&& rq_data_dir(clone) == READ) {
	/* If it is for ICE, free up req_io and return */
	if (encryption_mode == DM_REQ_CRYPT_ENCRYPTION_MODE_TRANSPARENT) {
		mempool_free(req_io, req_io_pool);
		goto submit_request;
	}