]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/dm-crypt.c
SG: Change sg_set_page() to take length and offset argument
[linux-2.6-omap-h63xx.git] / drivers / md / dm-crypt.c
index ac54f697c508e57adc95d545ca4ec15459118d84..1c159ac68c98f2372ffebe58f363fa1ff6e63a80 100644 (file)
@@ -351,14 +351,10 @@ static int crypt_convert(struct crypt_config *cc,
                struct scatterlist sg_in, sg_out;
 
                sg_init_table(&sg_in, 1);
-               sg_set_page(&sg_in, bv_in->bv_page);
-               sg_in.offset = bv_in->bv_offset + ctx->offset_in;
-               sg_in.length = 1 << SECTOR_SHIFT;
+               sg_set_page(&sg_in, bv_in->bv_page, 1 << SECTOR_SHIFT, bv_in->bv_offset + ctx->offset_in);
 
                sg_init_table(&sg_out, 1);
-               sg_set_page(&sg_out, bv_out->bv_page);
-               sg_out.offset = bv_out->bv_offset + ctx->offset_out;
-               sg_out.length = 1 << SECTOR_SHIFT;
+               sg_set_page(&sg_out, bv_out->bv_page, 1 << SECTOR_SHIFT, bv_out->bv_offset + ctx->offset_out);
 
                ctx->offset_in += sg_in.length;
                if (ctx->offset_in >= bv_in->bv_len) {