Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2999732imm; Thu, 24 May 2018 20:52:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqZVUiQGkWlzRtVYo8ackWnEhs2YXcG1fSJ/gY8nX8x26JhpHAgLn2cnVP364JQg8jQsqpI X-Received: by 2002:a17:902:aa04:: with SMTP id be4-v6mr852805plb.20.1527220351823; Thu, 24 May 2018 20:52:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220351; cv=none; d=google.com; s=arc-20160816; b=f2iM7TIvxmR6GdtVYN2hTJ8wVQeYPzeVZSzAP/eD292COh/1ZAbbznhBM30cR3htKW lew9QEKV99TrttvYVqnB6pqW9IrHC7JJ56FpK1lxvm4u51PD4cDseDyCMuo8koXaMdff PYgsAIa9/o9WFNJgjVqAwgaI8vSh27aWr7JIvFNtchaIHoUcMw/CRm5MtKyub5uQzjRc +FSLKR/mTVR+vHYsLMKGSduwp62LHshuOTfmJ8ytOe+XdlozPaPlfKM5XvzFwlm57qJA 5DxnEEMSGoZMlNd1h5Vi+KpXwQRncpU4WI8IsfXxaitPHBnyEx42IeQLUc/7BePgX6oC 6e+w== 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=XxHynV0iF4d3+VW6HXZSQqiqPX9X9IK2u+1EyRkvggI=; b=GnNva50p8WstKoolOaKq5TIJtZJNmzbfu+yfwczJopK30VnNkzDptrHa3q5v6uZJYx jX4LLc4CPmuwzGtbIhUfnRT0g2o93ivoI6QDLV05Wzoa1ajx71rLS4gq/oGcewhY8OLi p6Q+xa1m3lfg5GYqjXSQJ/2UxGEw7XymvJz3igfAu8ZvHqoUxzLd/JE5XFbuL1y/mki0 RrGVojp2rD6j/j9sh4lTfpsPomqhpFzncQHuB9XFjls55a2JBcyRbPqVzYrMIBymX7Mu 4A6kjGu9eXVc/hOPxRh8Kn2dICzIKZJhK3yqZhgAb9S05Cx6EISZg49h+kOakaX2JBEf nVlg== 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 v38-v6si23354896plg.283.2018.05.24.20.52.17; Thu, 24 May 2018 20:52:31 -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 S935800AbeEYDvc (ORCPT + 99 others); Thu, 24 May 2018 23:51:32 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43534 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933469AbeEYDv3 (ORCPT ); Thu, 24 May 2018 23:51:29 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 456EDBB41D; Fri, 25 May 2018 03:51:29 +0000 (UTC) Received: from localhost (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6B9FC1002941; Fri, 25 May 2018 03:51:19 +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 25/33] xfs: conver to bio_for_each_page_all2 Date: Fri, 25 May 2018 11:46:13 +0800 Message-Id: <20180525034621.31147-26-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.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 25 May 2018 03:51:29 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 25 May 2018 03:51:29 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.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(). Given bvec can't be changed under bio_for_each_page_all2(), this patch marks the bvec parameter as 'const' for xfs_finish_page_writeback(). Signed-off-by: Ming Lei --- fs/xfs/xfs_aops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 13e2c167aec3..b5077eb4df51 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -107,7 +107,7 @@ xfs_find_daxdev_for_inode( static void xfs_finish_page_writeback( struct inode *inode, - struct bio_vec *bvec, + const struct bio_vec *bvec, int error) { struct buffer_head *head = page_buffers(bvec->bv_page), *bh = head; @@ -169,6 +169,7 @@ xfs_destroy_ioend( for (bio = &ioend->io_inline_bio; bio; bio = next) { struct bio_vec *bvec; int i; + struct bvec_iter_all bia; /* * For the last bio, bi_private points to the ioend, so we @@ -180,7 +181,7 @@ xfs_destroy_ioend( next = bio->bi_private; /* walk each page on bio, ending page IO on them */ - bio_for_each_page_all(bvec, bio, i) + bio_for_each_page_all2(bvec, bio, i, bia) xfs_finish_page_writeback(inode, bvec, error); bio_put(bio); -- 2.9.5