From patchwork Tue Dec 27 16:04:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 9493257 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 46FBF62AB4 for ; Mon, 2 Jan 2017 09:33:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 461F8205AB for ; Mon, 2 Jan 2017 09:33:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B03922689; Mon, 2 Jan 2017 09:33:59 +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=-3.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) (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 F0345267EC for ; Mon, 2 Jan 2017 09:33:58 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v029WZHn048160; Mon, 2 Jan 2017 04:32:35 -0500 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 uBRG5xrX011980 for ; Tue, 27 Dec 2016 11:05:59 -0500 Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBRG5x1W010460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 Dec 2016 11:05:59 -0500 Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) (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 0213C445E1; Tue, 27 Dec 2016 16:05:59 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id i88so18316621pfk.2; Tue, 27 Dec 2016 08:05:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1FKFNE2yqu01jvboKCRAc0BRp8cjn37+W4YMpJV6a6I=; b=YzegdbAnIO61u99LoEIxWyeu5ihCebTd+3RFYKcI7+rsElyeHCEWh5W3aeFKb1USrS 6qx1xLV/JIsZP8K6ZLXVzQBLbH6Ax6QIjbpU5nKGEjQhQbzOPHnVJRo6QWy8zAU5xL8u /HNdl83AKBSdh3zOZTdtyoe0fOigWbheTYURdWZyGuM4v6Q+bHEPFSPJX2cIAv75MO0W 31o6kDue6NHVpqgztu3nCDAWIkeItbqoaatYEWSko7CfJS+xnwumcV7WazDC8YZGlSv3 CKKbzuCOvNVpvoYY5bVH6d1Vyr8FuL3vvlAPivayZmFzptwT86taM4qIeI8jC2t1tptc TXaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1FKFNE2yqu01jvboKCRAc0BRp8cjn37+W4YMpJV6a6I=; b=m8aVhPTgqUtKOmrW7B0GNsxfto3VUgbbxwe7cvoK87Bj9MvRNh0N+VeTh5J2wArVLz u7TcnFui2kHst3mFH92h13sPG6BdSIrxRsPAB81kQ5SeNmH5qhsZ/OUOhmbjr6jaw6QK /uVAXbXqfIOur9W20p09qU/YK5ceATOKRPtJI0slpyvRP7TTtgdeaEh/x20aUvfPZlq6 WFX9SC49XSfKwnA5j6kqKYxORxFSjbX8r114as9r+6K3KanAVgXRuYXD8y0IN1TKLAw2 PUX9AIXex2L7KS/Yr1gFAHReFbrHUxp1ot7A7tyFUoXC+CUanKiBZXaSWaIx5xwBbvvn ec1g== X-Gm-Message-State: AIkVDXKKuD62OANHkGjepHKFcNpuUEWyJbwQYxSq97XFnf/MT9z1cYu4j+ha8CxjWKG5ug== X-Received: by 10.99.204.81 with SMTP id q17mr59697006pgi.168.1482854758514; Tue, 27 Dec 2016 08:05:58 -0800 (PST) Received: from localhost ([45.35.47.137]) by smtp.gmail.com with ESMTPSA id g28sm26564254pgn.13.2016.12.27.08.05.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Dec 2016 08:05:57 -0800 (PST) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Date: Wed, 28 Dec 2016 00:04:46 +0800 Message-Id: <1482854706-14128-6-git-send-email-tom.leiming@gmail.com> In-Reply-To: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> References: <1482854706-14128-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.30]); Tue, 27 Dec 2016 16:05:59 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 27 Dec 2016 16:05:59 +0000 (UTC) for IP:'209.85.192.196' DOMAIN:'mail-pf0-f196.google.com' HELO:'mail-pf0-f196.google.com' FROM:'tom.leiming@gmail.com' RCPT:'' X-RedHat-Spam-Score: -1.157 (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.192.196 mail-pf0-f196.google.com 209.85.192.196 mail-pf0-f196.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 02 Jan 2017 04:31:56 -0500 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" , Alasdair Kergon Subject: [dm-devel] [PATCH v1 37/54] dm-crypt: convert to bio_for_each_segment_all_sp() 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 593cdf88bf5f..c6932fb85418 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1038,8 +1038,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_sp(bv, clone, i, bia) { BUG_ON(!bv->bv_page); mempool_free(bv->bv_page, cc->page_pool); }