Commit adfe4770 authored by Milan Broz's avatar Milan Broz Committed by Alasdair G Kergon
Browse files

dm crypt: fix write endio

Fix BIO_UPTODATE test for write io.

Signed-off-by: default avatarMilan Broz <>
Signed-off-by: default avatarAlasdair G Kergon <>
parent d1622e89
......@@ -511,6 +511,9 @@ static void crypt_endio(struct bio *clone, int error)
struct crypt_config *cc = io->target->private;
unsigned read_io = bio_data_dir(clone) == READ;
if (unlikely(!bio_flagged(clone, BIO_UPTODATE) && !error))
error = -EIO;
* free the processed pages
......@@ -519,10 +522,8 @@ static void crypt_endio(struct bio *clone, int error)
goto out;
if (unlikely(!bio_flagged(clone, BIO_UPTODATE))) {
error = -EIO;
if (unlikely(error))
goto out;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment