Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84577
b: refs/heads/master
c: ee7a491
h: refs/heads/master
i:
  84575: 9b22f19
v: v3
  • Loading branch information
Milan Broz authored and Alasdair G Kergon committed Feb 8, 2008
1 parent 2a59727 commit 01d802e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5742fd77757894ebb5e441afbdac1fb666e782f7
refs/heads/master: ee7a491e62214bfd56c97c1fef3672c09e2a700d
17 changes: 6 additions & 11 deletions trunk/drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,28 +504,23 @@ static void crypt_endio(struct bio *clone, int error)
{
struct dm_crypt_io *io = clone->bi_private;
struct crypt_config *cc = io->target->private;
unsigned read_io = bio_data_dir(clone) == READ;
unsigned rw = bio_data_dir(clone);

if (unlikely(!bio_flagged(clone, BIO_UPTODATE) && !error))
error = -EIO;

/*
* free the processed pages
*/
if (!read_io) {
if (rw == WRITE)
crypt_free_buffer_pages(cc, clone);
goto out;
}

if (unlikely(error))
goto out;

bio_put(clone);
kcryptd_queue_crypt(io);
return;

out:
bio_put(clone);
if (rw == READ && !error) {
kcryptd_queue_crypt(io);
return;
}

if (unlikely(error))
io->error = error;
Expand Down

0 comments on commit 01d802e

Please sign in to comment.