projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1622e8
)
dm crypt: fix write endio
author
Milan Broz
<
[email protected]
>
Thu, 13 Dec 2007 14:15:51 +0000
(14:15 +0000)
committer
Alasdair G Kergon
<
[email protected]
>
Thu, 20 Dec 2007 17:32:10 +0000
(17:32 +0000)
Fix BIO_UPTODATE test for write io.
Cc:
[email protected]
Cc:
[email protected]
Signed-off-by: Milan Broz <
[email protected]
>
Signed-off-by: Alasdair G Kergon <
[email protected]
>
drivers/md/dm-crypt.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-crypt.c
b/drivers/md/dm-crypt.c
index 28c6ae095c560d9377aa5e182e8b8af38de11117..30d51a0c01161f5a5adeb916892d48ebd82d3a5f 100644
(file)
--- a/
drivers/md/dm-crypt.c
+++ b/
drivers/md/dm-crypt.c
@@
-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;
- }
bio_put(clone);
kcryptd_queue_crypt(io);