Commit 0b39ca45 authored by Carlos Llamas's avatar Carlos Llamas Committed by Jens Axboe
Browse files

blk-crypto: use BLK_STS_INVAL for alignment errors

Make __blk_crypto_bio_prep() propagate BLK_STS_INVAL when IO segments
fail the data unit alignment check.

This was flagged by an LTP test that expects EINVAL when performing an
O_DIRECT read with a misaligned buffer [1].

Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/all/aP-c5gPjrpsn0vJA@google.com/

 [1]
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
Reviewed-by: default avatarEric Biggers <ebiggers@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 19de03b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment