From patchwork Tue Aug 21 09:09:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikulas Patocka X-Patchwork-Id: 1352811 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by patchwork1.kernel.org (Postfix) with ESMTP id C5E4040210 for ; Tue, 21 Aug 2012 09:12:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q7L99tka012664; Tue, 21 Aug 2012 05:09:55 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q7L99rqa025247 for ; Tue, 21 Aug 2012 05:09:53 -0400 Received: from tawny.mazyland.net (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7L99j8L031291; Tue, 21 Aug 2012 05:09:47 -0400 From: Mikulas Patocka To: dm-devel@redhat.com Date: Tue, 21 Aug 2012 11:09:14 +0200 Message-Id: In-Reply-To: <520994e0c87d38ca6abb8dd60760aef993842a32.1345477953.git.mbroz@redhat.com> References: <520994e0c87d38ca6abb8dd60760aef993842a32.1345477953.git.mbroz@redhat.com> In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-loop: dm-devel@redhat.com Cc: Mikulas Patocka Subject: [dm-devel] [PATCH 03/20] dm-crypt: remove completion restart X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com It won't be used in this context anyway. Signed-off-by: Mikulas Patocka --- drivers/md/dm-crypt.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 4c8b4e0..144c337 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -34,7 +34,6 @@ * context holding the current state of a multi-part conversion */ struct convert_context { - struct completion restart; struct bio *bio_in; struct bio *bio_out; unsigned int offset_in; @@ -636,7 +635,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->cc_sector = sector + cc->iv_offset; - init_completion(&ctx->restart); } static struct dm_crypt_request *dmreq_of_req(struct crypt_config *cc, @@ -752,8 +750,6 @@ static int crypt_convert(struct crypt_config *cc, switch (r) { /* async */ case -EBUSY: - wait_for_completion(&ctx->restart); - INIT_COMPLETION(ctx->restart); /* fall through*/ case -EINPROGRESS: ctx->req = NULL; @@ -1167,7 +1163,6 @@ static void kcryptd_async_done(struct crypto_async_request *async_req, struct crypt_config *cc = io->cc; if (error == -EINPROGRESS) { - complete(&ctx->restart); return; }