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: 9403253 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 9F5B260588 for ; Sat, 29 Oct 2016 08:17:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B70829D0F for ; Sat, 29 Oct 2016 08:17:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FF1129D76; Sat, 29 Oct 2016 08:17:21 +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 3F54629D0F for ; Sat, 29 Oct 2016 08:17:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966285AbcJ2IRT (ORCPT ); Sat, 29 Oct 2016 04:17:19 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35570 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966485AbcJ2IQV (ORCPT ); Sat, 29 Oct 2016 04:16:21 -0400 Received: by mail-pf0-f196.google.com with SMTP id s8so3385605pfj.2; Sat, 29 Oct 2016 01:16:20 -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=jUe7ncDXCGII1RwoueSHdL3qaj+BQxh/4ErpyDbQKCqImf8zTM/hP5Y2OA/LXmakk1 GDMZw0clVvnhQ0YPGqq0ZYfDYhDIv5JD/PVqzFEORBihzcPBpsIMSWC7dydYhOdO4wJ3 yj84tX3M+qJNJYG5IBWuwWafphGytLPPtbkYmKmHJSTdyhXW6R43NolyBc84FStdIOfy 3/woBFgRjwtK2NZSxjt3yhdWff6LTrGQQMqbovtaBMOeHLVUTOlNjWGRtrqKwC053wsh CEUq2JSVdO1Rq+BqoN4CljpDylcuyJF6mNT8ocMw5OaQMhlazU2yiNWZWfef4pXck5GN 3xOQ== X-Gm-Message-State: ABUngvfryXTBR9I9LQSPo+7gnLcNzokHIvMcd9QL69n0wDKSmZSX6y+N4ZGFaMHcj7O2pw== 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 Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, Christoph Hellwig , "Kirill A . Shutemov" , 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 58/60] dm-crypt: convert to bio_for_each_segment_all_rd() Date: Sat, 29 Oct 2016 16:08:57 +0800 Message-Id: <1477728600-12938-59-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> References: <1477728600-12938-1-git-send-email-tom.leiming@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 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;