Commit 0b39ca4
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 <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/all/[email protected]/ [1]
Signed-off-by: Carlos Llamas <[email protected]>
Reviewed-by: Eric Biggers <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>1 parent 19de03b commit 0b39ca4
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
0 commit comments