Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1977702imm; Sat, 9 Jun 2018 05:36:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIB3xmtpijvl+7jEkax06BldeB53UKgZ3laTsN0R/NOMwkWHK4bECyOto9WfJ24eeCZNp0L X-Received: by 2002:a63:61d6:: with SMTP id v205-v6mr8622384pgb.432.1528547769355; Sat, 09 Jun 2018 05:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528547769; cv=none; d=google.com; s=arc-20160816; b=p9O8alFGfvQjgt1AlCQ7XoK5SVAWnbuEc1si/9YTIA6xIrbtu/b0LqsyniSVVOtN7E 7rokdVKIS2xE+3+MNR3g4yYZA+O6a0pqhNH/IszwghNmnFsfVB47nc+lQP+CS40b7drA 6vUxDj9qQtesle7DgDK8CX8q8ZhUD7qiNtY1nJ83I1QNBp4xT1JPtIH+h65hSOUs8WZk 5qe6Geie8zRes3zbBcFB51BDKGzcrefIoxAJwwTS9Y4c4+mPJL3zW5MrvnAHABF2FcEY xIiMEg5I/TWYCTJb8zEreJJfQPp+uzFzZuagSRBo/bq9ygvl8G9YSTJzDK7NllqwTcCo hMJA== 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=qiIuc4Jrd5OMq+JvJamUY4gVFhwrKuhLKXdj7pDQD1M=; b=ST+LvnX7KrNsR1gQd3+t/soCy1LoZ2nUGk9JnIl+OC6ShubYl1ct7zjryvtQ7uIf4Z klMFH7GvC2mZsXroe7OEee7Y6CN51cBgJwj21AJkcoFlrV29GzTIgRm6XhtI/l9CkkfT DVWZSGOUovFwtEJRvBpS+8vMj5fQ0wgMYjP8tJ1ymN0q686t3Jy0bzqGVN/8OdgXJ+DQ JvPLTiYF79ec7aBKYquWJMasOtBDg46NqJY72Jt/WWpO4vuzb7qWix1C6t0wBm00dB5I AfXQiNVI714dj3YwP1I0D4hhc+7DM1NZYERIXYxsZSQIA12XgQXjnVDVECKAXPkh1k7U Hd6Q== 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 q18-v6si32074014pfq.307.2018.06.09.05.35.55; Sat, 09 Jun 2018 05:36:09 -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 S1753460AbeFIMfL (ORCPT + 99 others); Sat, 9 Jun 2018 08:35:11 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:51586 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932081AbeFIMfH (ORCPT ); Sat, 9 Jun 2018 08:35:07 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CCE2A406F8B8; Sat, 9 Jun 2018 12:35:06 +0000 (UTC) Received: from localhost (ovpn-12-40.pek2.redhat.com [10.72.12.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC1922023488; Sat, 9 Jun 2018 12:35:01 +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 24/30] xfs: conver to bio_for_each_chunk_segment_all Date: Sat, 9 Jun 2018 20:30:08 +0800 Message-Id: <20180609123014.8861-25-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.78 on 10.11.54.4 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:35:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Sat, 09 Jun 2018 12:35:06 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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_chunk_segment_all(). Given bvec can't be changed under bio_for_each_chunk_segment_all(), 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 ca6903726689..c134db97911d 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_chunk_iter citer; /* * 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_segment_all(bvec, bio, i) + bio_for_each_chunk_segment_all(bvec, bio, i, citer) xfs_finish_page_writeback(inode, bvec, error); bio_put(bio); -- 2.9.5