Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84575
b: refs/heads/master
c: fcd369d
h: refs/heads/master
i:
  84573: b5f3f00
  84571: 60b36e0
  84567: 3e958c6
  84559: 38affc0
  84543: d7c18b1
v: v3
  • Loading branch information
Milan Broz authored and Alasdair G Kergon committed Feb 8, 2008
1 parent 987c826 commit 9b22f19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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: 53017030e2548dffbe481fb4ab6b587abbee6f8b
refs/heads/master: fcd369daa36d547607dbedd0b41099d6dfc1d1c7
10 changes: 4 additions & 6 deletions trunk/drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ struct convert_context {
unsigned int idx_in;
unsigned int idx_out;
sector_t sector;
int write;
};

/*
Expand Down Expand Up @@ -327,7 +326,7 @@ crypt_convert_scatterlist(struct crypt_config *cc, struct scatterlist *out,
static void crypt_convert_init(struct crypt_config *cc,
struct convert_context *ctx,
struct bio *bio_out, struct bio *bio_in,
sector_t sector, int write)
sector_t sector)
{
ctx->bio_in = bio_in;
ctx->bio_out = bio_out;
Expand All @@ -336,7 +335,6 @@ static void crypt_convert_init(struct crypt_config *cc,
ctx->idx_in = bio_in ? bio_in->bi_idx : 0;
ctx->idx_out = bio_out ? bio_out->bi_idx : 0;
ctx->sector = sector + cc->iv_offset;
ctx->write = write;
}

/*
Expand Down Expand Up @@ -372,7 +370,7 @@ static int crypt_convert(struct crypt_config *cc,
}

r = crypt_convert_scatterlist(cc, &sg_out, &sg_in, sg_in.length,
ctx->write, ctx->sector);
bio_data_dir(ctx->bio_in) == WRITE, ctx->sector);
if (r < 0)
break;

Expand Down Expand Up @@ -587,7 +585,7 @@ static void process_write(struct dm_crypt_io *io)

atomic_inc(&io->pending);

crypt_convert_init(cc, &io->ctx, NULL, base_bio, sector, 1);
crypt_convert_init(cc, &io->ctx, NULL, base_bio, sector);

/*
* The allocated buffers can be smaller than the whole bio,
Expand Down Expand Up @@ -638,7 +636,7 @@ static void process_read_endio(struct dm_crypt_io *io)
struct crypt_config *cc = io->target->private;

crypt_convert_init(cc, &io->ctx, io->base_bio, io->base_bio,
io->base_bio->bi_sector - io->target->begin, 0);
io->base_bio->bi_sector - io->target->begin);

crypt_dec_pending(io, crypt_convert(cc, &io->ctx));
}
Expand Down

0 comments on commit 9b22f19

Please sign in to comment.