From patchwork Sat Oct 29 08:08:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9405163 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B46746022E for ; Mon, 31 Oct 2016 09:01:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 934AA29293 for ; Mon, 31 Oct 2016 09:01:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 828B929290; Mon, 31 Oct 2016 09:01:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 252B32928D for ; Mon, 31 Oct 2016 09:01:09 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9V8wGmu014765; Mon, 31 Oct 2016 04:58:17 -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 u9T8GLrt026992 for ; Sat, 29 Oct 2016 04:16:21 -0400 Received: from mx1.redhat.com (ext-mx09.extmail.prod.ext.phx2.redhat.com [10.5.110.38]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9T8GLwk030614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 29 Oct 2016 04:16:21 -0400 Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 267584E4C1; Sat, 29 Oct 2016 08:16:21 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id n85so3392074pfi.3; Sat, 29 Oct 2016 01:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0TZfPR0y1YfU3a7SlAS+UmuccPg72/AfI+jaLXsokTI=; b=IFT5B6UZUaJaTPpc/EKPMv/wd6pcOgoN8rrq22VZmWIaj+lsZOKCEd3eS5BnN0ujWc nJOfzNLtzhfNY/M2ZRrO31j2L1SUWsjk/qVs//MPOVpx10bEoWN9m2EMCqKwNdMnhQJo aYdm0bEt6mG3JF1otfrbUBU5Ct9w1UqqKqXBmpREABCSf2Ultv44W6yPJmkgJHs8Rdc5 KRVQpC/tKWC4jhu8a/3SuEUSA8aiCLeZ0Qz0WRGy7C8zZHlqeJI1X7W9Qm45nhSjgkJp 79eEA4DatW72YB3X0alXH5ZU8Z7S8t0vUYrTurcGmjaUzTXhc6qLxFGaWNFsyl3pI7QI BImw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0TZfPR0y1YfU3a7SlAS+UmuccPg72/AfI+jaLXsokTI=; b=GvmqimLbBUDvRUm1ONCb75t2BeHse3VqS5exIeq8NDZWxBwCne7vrnXV7yEP6glcGH uWZ+2ikpjYIrwQbtBWxR1nSWU0eerWVcdUAbUs8NtBZpJEiJjJepQ/cUop0mo32uuyTO o91mRZ6Ah2liBM3r4wvrqZgnpYwjxrO3AnuTlpYQL88axzGo57sT1uVIja81VnOSAj4+ yz/PFpnFbV+W8xY5n3yzUwJlGCKwXIbWW+ENwb5E3fU/kSdpfh9hEI2IwtKujbQNN70w oB0h5jibv2bN8VPuOdS7PjGy6/pyzFcHzfvZWiuJ04gDtEc0yi4e+srYGHhD0vcrm1Kk jlKg== X-Gm-Message-State: ABUngvcht6IA3JyVzRnIisKXk0fOUzmcCOXazNNLsuNqL4jrU3zeBl8qOdVbqLx2JXTsmA== X-Received: by 10.98.25.67 with SMTP id 64mr32314708pfz.46.1477728980208; Sat, 29 Oct 2016 01:16:20 -0700 (PDT) Received: from localhost ([45.34.23.101]) by smtp.gmail.com with ESMTPSA id w67sm23565699pfd.36.2016.10.29.01.16.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Oct 2016 01:16:19 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Date: Sat, 29 Oct 2016 16:08:57 +0800 Message-Id: <1477728600-12938-59-git-send-email-tom.leiming@gmail.com> In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 29 Oct 2016 08:16:21 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 29 Oct 2016 08:16:21 +0000 (UTC) for IP:'209.85.192.193' DOMAIN:'mail-pf0-f193.google.com' HELO:'mail-pf0-f193.google.com' FROM:'tom.leiming@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.189 * (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, SPF_PASS) 209.85.192.193 mail-pf0-f193.google.com 209.85.192.193 mail-pf0-f193.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.38 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 31 Oct 2016 04:58:15 -0400 Cc: Christoph Hellwig , Mike Snitzer , Ming Lei , linux-block@vger.kernel.org, "maintainer:DEVICE-MAPPER LVM, Shaohua Li , linux-raid@vger.kernel.org open list:SOFTWARE RAID Multiple DisksSUPPORT" , "Kirill A . Shutemov" , linux-fsdevel@vger.kernel.org, Alasdair Kergon Subject: [dm-devel] [PATCH 58/60] dm-crypt: convert to bio_for_each_segment_all_rd() X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk 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 X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ming Lei --- drivers/md/dm-crypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 4999c7497f95..ed0f54e51638 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1034,8 +1034,9 @@ static void crypt_free_buffer_pages(struct crypt_config *cc, struct bio *clone) { unsigned int i; struct bio_vec *bv; + struct bvec_iter_all bia; - bio_for_each_segment_all(bv, clone, i) { + bio_for_each_segment_all_rd(bv, clone, i, bia) { BUG_ON(!bv->bv_page); mempool_free(bv->bv_page, cc->page_pool); bv->bv_page = NULL;