Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1978394imm; Sat, 9 Jun 2018 05:36:59 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKW5ZY8l+At0m2axdfTrajzH0LA4TMoXkCNatSs0Sx7V0c3RNS736xoY6YgoFyU9IM8EmWl X-Received: by 2002:a17:902:8a8c:: with SMTP id p12-v6mr10564242plo.94.1528547819344; Sat, 09 Jun 2018 05:36:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528547819; cv=none; d=google.com; s=arc-20160816; b=Yrwgu11eGlpRyoIn5gm99TlSgucUu/yapZS0pS/CHLMO7Ev0Wg7v1ItsyD+tKDPq2y Z/AB+Pr6dMZ7r/POXCtVNtxIM+kC5ACKDmHQgJMAZwBxiir6BlDq6oxJrQVMUTC8/9vi UDi6BWqHVt7xPu2FL5ju4Gv2ywbksx+xCid66ko5h9t8Y9Z2GDYOkskyAddhCwCTmStk nJTIv8DAbv5/3UTo69JSGYRwcB20VX7xV6HhNHyrz+xQd1Fk4abI4W7yQmnvxKIaRU4x /lIE9VHh7ylKmGNeIC/Tf3Qb4vkQIdo7oS/UfseccLFiZxYeyCm0wFt6iD2c5Z+q2f5Y 9QqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=3niy5+2Z1MF6VDZsYuBE1MlFQYPFclrPYantNo2/5xI=; b=lzOUsKP4vjkLWmWOVzW5q75XSlxLvqxDuQXqVlvqK/TjB7AOqcOtbmXV0EzfME0YCk ZU3I4ofQoiHpcjIUe5h8l+ixsBsS/RXzM9lk7WpeVYgsu881ZzX9+eMC7aOc8YZcfAtI oCkq7BOkTo31pRHEENo/oKH8rKkVrS8vUkjouPM7BRIHnRUq0+OrA2ju2teoVQ5XxWOo +C+tqob4eynRv2v3DNj/fG6UVGM0kmEJaqMeRkBP1rhCWiVuPAf2wdx5le7Z11kFrKoY S38jDANjAXZ3uNeAkxtNs+Tc2d8dOUScgzkMkpZJk8rfQN4GEeQU54gak3yizES8GZVL GRBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b8-v6si60777568pls.261.2018.06.09.05.36.44; Sat, 09 Jun 2018 05:36:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932143AbeFIMez (ORCPT + 99 others); Sat, 9 Jun 2018 08:34:55 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51548 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932110AbeFIMev (ORCPT ); Sat, 9 Jun 2018 08:34:51 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 140E4406E897; Sat, 9 Jun 2018 12:34:51 +0000 (UTC) Received: from localhost (ovpn-12-40.pek2.redhat.com [10.72.12.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6ED3042236; Sat, 9 Jun 2018 12:34:42 +0000 (UTC) From: Ming Lei To: Jens Axboe , Christoph Hellwig , Alexander Viro , Kent Overstreet Cc: David Sterba , Huang Ying , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana , Randy Dunlap , Ming Lei Subject: [PATCH V6 22/30] ext4: conver to bio_for_each_chunk_segment_all Date: Sat, 9 Jun 2018 20:30:06 +0800 Message-Id: <20180609123014.8861-23-ming.lei@redhat.com> In-Reply-To: <20180609123014.8861-1-ming.lei@redhat.com> References: <20180609123014.8861-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 09 Jun 2018 12:34:51 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 09 Jun 2018 12:34:51 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org bio_for_each_segment_all() can't be used any more after multipage bvec is enabled, so we have to convert to bio_for_each_chunk_segment_all(). Signed-off-by: Ming Lei --- fs/ext4/page-io.c | 3 ++- fs/ext4/readpage.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index db7590178dfc..d4e737e51176 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c @@ -63,8 +63,9 @@ static void ext4_finish_bio(struct bio *bio) { int i; struct bio_vec *bvec; + struct bvec_chunk_iter citer; - bio_for_each_segment_all(bvec, bio, i) { + bio_for_each_chunk_segment_all(bvec, bio, i, citer) { struct page *page = bvec->bv_page; #ifdef CONFIG_EXT4_FS_ENCRYPTION struct page *data_page = NULL; diff --git a/fs/ext4/readpage.c b/fs/ext4/readpage.c index 9ffa6fad18db..234e4486a90c 100644 --- a/fs/ext4/readpage.c +++ b/fs/ext4/readpage.c @@ -72,6 +72,7 @@ static void mpage_end_io(struct bio *bio) { struct bio_vec *bv; int i; + struct bvec_chunk_iter citer; if (ext4_bio_encrypted(bio)) { if (bio->bi_status) { @@ -81,7 +82,7 @@ static void mpage_end_io(struct bio *bio) return; } } - bio_for_each_segment_all(bv, bio, i) { + bio_for_each_chunk_segment_all(bv, bio, i, citer) { struct page *page = bv->bv_page; if (!bio->bi_status) { -- 2.9.5