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: 9489477 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 5E85C62AAD for ; Tue, 27 Dec 2016 16:06:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E71925D99 for ; Tue, 27 Dec 2016 16:06:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4152025E13; Tue, 27 Dec 2016 16:06:34 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DEA85201BC for ; Tue, 27 Dec 2016 16:06:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932843AbcL0QGO (ORCPT ); Tue, 27 Dec 2016 11:06:14 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33915 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932797AbcL0QF7 (ORCPT ); Tue, 27 Dec 2016 11:05:59 -0500 Received: by mail-pf0-f196.google.com with SMTP id y68so18353333pfb.1; Tue, 27 Dec 2016 08:05:59 -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=pmvxXxaYIdI1CE7iSu6lxDlL0/Xsbp4Mo89WL84puEwEtP2L3efywlX2Idprlkaoa2 xWiOnHBGXI8K6hhILAHBI9CbSnrvwCQ4fBhGQ7bkqt65G8rbfNN352Jn3YdNbgx+SH7E g/Gr6imW35TMri5nLRnIj8p2oaBpgXs4Nht5c9dy3DDNOp9EvVczI24BNa9sKceg5/ZD X1MFYY8cg4D283YrQrwGzsm0FsGiwgc3Tvx1S4g1vplLlXsHMV1EWju+7nHh0dPpTVfw jcujQ3F1mGCE6+Poy3Wdm4Jqeg0i82fUyXgl064Z+x7cNn5cuG5pk4cFOAxnP1ZpR1cD z7vQ== X-Gm-Message-State: AIkVDXJHVNZXgajS3q0E4wqlKkCFAWf7TPHxYwDSRxeKLoBs7ljuNX9E3AoXoLOoNOMltQ== 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 Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Alasdair Kergon , Mike Snitzer , dm-devel@redhat.com (maintainer:DEVICE-MAPPER (LVM)), Shaohua Li , linux-raid@vger.kernel.org (open list:SOFTWARE RAID (Multiple Disks) SUPPORT) Subject: [PATCH v1 37/54] dm-crypt: convert to bio_for_each_segment_all_sp() Date: Wed, 28 Dec 2016 00:04:46 +0800 Message-Id: <1482854706-14128-6-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> References: <1482854706-14128-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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); }