Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3002113imm; Thu, 24 May 2018 20:56:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrOpeMpwun/06NSioSJIXwDigxXuA7ZF3u9CqUQiIeG1IMCxHeas2/HGAjDlJSoxLFGKhin X-Received: by 2002:a62:981d:: with SMTP id q29-v6mr807759pfd.65.1527220566845; Thu, 24 May 2018 20:56:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220566; cv=none; d=google.com; s=arc-20160816; b=HbrffZmpyWjwPEjHEzOPRk+BQUFvcmFCQ1UyCU3/OCF+xQvEtLvhxKpfoKE0Em1L7Y al8QAdzYeVWmxXZEN4Q4fv9xASvrA/rl2eQm8bV+AfKoEHsQGejwMqrSikLIkLQCHjWp RRPfhpg03ivFsinK+eeWlGNLJVEdr4zZhEHjuf9DdXeXAYb+bCkmeK13ajeEuOUjgY31 tKldPqOwV2d2WQnUBeWYOXHLJRcKd86E25HiuQZM37SA68kWEAc21ktFv8o3lZdurAJO 2Igj/Gs7d0gRtJtNQWiKxXG/HPPobm34oWbfZ+IrgDEgzJZ+h7UJwXrzGDtCPhqvNGvS c2sQ== 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=F5D4S5XGRBMvNwWw2SeItz+UyCLm+CsiwNxRb6u5yOA=; b=Wsoa3GnOYhCRC0P2wXpsMs1Hpua55OMcMCmJfVZ/PD+KhSxsJIGrCC3FvupyiZtuxf puumVTtGn/X9NGcaph7jcqpz7TUB8gahZkB9HBbKGfi6+f7I/WIXouaOOSugUR+NG/Os 5P7tURRWwgyi4aLL/mTS67LSGZFqvslL/j6iHCbprqOPewOTjmBYV15fAj0za9OoM7g0 V0csbo/1fow8CwYd2eICG5FesDcUqM/6v+uMVTdYdwVASeOEJsjQ9E2rvaOPiMLDycw9 TPCeFgu1f1YYINWGx7cmXaBqV5Sim6R5OL3jTmUzakVAm/cAmYPmWO5Xfo+kRN+vOxc4 gVDQ== 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 f8-v6si22748108plr.471.2018.05.24.20.55.52; Thu, 24 May 2018 20:56:06 -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 S964999AbeEYDvJ (ORCPT + 99 others); Thu, 24 May 2018 23:51:09 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:41546 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934532AbeEYDvH (ORCPT ); Thu, 24 May 2018 23:51:07 -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 0DF4340203F4; Fri, 25 May 2018 03:51:07 +0000 (UTC) Received: from localhost (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 960359457F; Fri, 25 May 2018 03:50:57 +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 , Ming Lei Subject: [RESEND PATCH V5 23/33] ext4: conver to bio_for_each_page_all2 Date: Fri, 25 May 2018 11:46:11 +0800 Message-Id: <20180525034621.31147-24-ming.lei@redhat.com> In-Reply-To: <20180525034621.31147-1-ming.lei@redhat.com> References: <20180525034621.31147-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.5]); Fri, 25 May 2018 03:51:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 25 May 2018 03:51:07 +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_page_all() can't be used any more after multipage bvec is enabled, so we have to convert to bio_for_each_page_all2(). 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 52f2937f5603..b56a733f33c0 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_iter_all bia; - bio_for_each_page_all(bvec, bio, i) { + bio_for_each_page_all2(bvec, bio, i, bia) { 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 572b6296f709..c46b5ff68fa8 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_iter_all bia; 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_page_all(bv, bio, i) { + bio_for_each_page_all2(bv, bio, i, bia) { struct page *page = bv->bv_page; if (!bio->bi_status) { -- 2.9.5