Received: by 10.213.65.68 with SMTP id h4csp357685imn; Tue, 13 Mar 2018 06:41:05 -0700 (PDT) X-Google-Smtp-Source: AG47ELsTGJ/Xt0U35eQ3mjhoOJ5JiKtGB8iej9evMu9GCtPu9a379DQKd1wFIRls37tWE20vxKnN X-Received: by 10.99.106.202 with SMTP id f193mr557504pgc.334.1520948465162; Tue, 13 Mar 2018 06:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520948465; cv=none; d=google.com; s=arc-20160816; b=zPraS505FVBN9l4sxCq8u81smAP/2k444XJZLjGiBZfQeuuyyQP4o3VV1iBj5WVgNm mlP3aJZdLIr6jWyJW1WqVBso7vG10WPPD5C2V39W+TZOfTGQHC14oazMybTS25AF1jak 4v3B3+G0RlLb7H1bgV0Q+QnJs8JjmJGTcQ5zlIoIjZPjVZcfA4ll3Or6Pm0fujC8cU/0 4W3an4pz8LCZTL9SiBRVAUIthMbY+aR6SH8Qn6Qd+O01LiTW/zzFI1gcoze7LHK7CfjO yavcDPlIgxD16YHjog1rrYkxcstewg1Qvb4R5Ayok2zrtqH8HgwmBUZy19CCmjL60FK9 S9mA== 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:dkim-signature:arc-authentication-results; bh=JjTEaMOzHz2PjC7g+eV5wKF8Vorb4bhecLy7b5tARUM=; b=Srx7SsOrG0piaBjEOIbyxMkIY7Tr2SmAXYHq9atFEMukYFbtGsiIq3TNzqsfw88Gx4 +apjdsctToejsH8HRxpj21oDBNVDIOuDWgS8PmuPvcBihbSGVVKAecex1PGyGikVX4jX qHU1kt9X7ePKr2h1d6J8xCIVZ7Mb5Q0r00z5FgIo1otxnzqrGRlZq81xPPWzYS1NGJnJ z20ULTtLwDPae2u+rjuFQ+qZ2PfYeZu17oJbb0yZ/4Cf5eh0tnmnRHg6WIQe4DS04QnB EZjhCtuWnV/r/gMuF6Svimg0mOqkMIhcKF/91pImef6FiekdSNFpS4jlUhNszmi0vz9I w9aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=R8uRsF0g; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a4si118569pgd.339.2018.03.13.06.40.50; Tue, 13 Mar 2018 06:41:05 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=R8uRsF0g; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932921AbeCMNiZ (ORCPT + 99 others); Tue, 13 Mar 2018 09:38:25 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:35434 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932589AbeCMN1B (ORCPT ); Tue, 13 Mar 2018 09:27:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JjTEaMOzHz2PjC7g+eV5wKF8Vorb4bhecLy7b5tARUM=; b=R8uRsF0gAGpPRIiaB6HdgLkHx Z5IxuVGJuHBSiljOjRb0pnUHL65MKquGtvr3gImSUpISJy9OL//Sqkp8JeLSkTVuzirlTkMIy4JM0 9QQoM/qHUqk9B0YAjtFASAu69+wpKcwJI6BqKTkWlyKawbQ1EVzXUH7Hlg/CCTE+pZ+o2lVJnoqvb HXXfB3tZIhg+qJzSm4V6Mwlsi135sLbYt+JliawCifxpkmAHd+gx1sDMWFK5bnPF6JH9qAl14NiQz 8Z88+zwogIFNhiS0V9DnCETYqpha3Rqax4EOoN+1gmI3Agu7j6ACAd2IrwmeIz8WuZ01lew6lSka5 rLBN2DC8g==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1evjxE-0004jJ-3z; Tue, 13 Mar 2018 13:27:00 +0000 From: Matthew Wilcox To: Andrew Morton Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Ryusuke Konishi , linux-nilfs@vger.kernel.org Subject: [PATCH v9 42/61] pagevec: Use xa_tag_t Date: Tue, 13 Mar 2018 06:26:20 -0700 Message-Id: <20180313132639.17387-43-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180313132639.17387-1-willy@infradead.org> References: <20180313132639.17387-1-willy@infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Matthew Wilcox Removes sparse warnings. Signed-off-by: Matthew Wilcox --- fs/btrfs/extent_io.c | 4 ++-- fs/ext4/inode.c | 2 +- fs/f2fs/data.c | 2 +- fs/gfs2/aops.c | 2 +- include/linux/pagevec.h | 8 +++++--- mm/swap.c | 4 ++-- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 4e22edd04457..bcc24ee5a2c9 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3789,7 +3789,7 @@ int btree_write_cache_pages(struct address_space *mapping, pgoff_t index; pgoff_t end; /* Inclusive */ int scanned = 0; - int tag; + xa_tag_t tag; pagevec_init(&pvec); if (wbc->range_cyclic) { @@ -3914,7 +3914,7 @@ static int extent_write_cache_pages(struct address_space *mapping, pgoff_t done_index; int range_whole = 0; int scanned = 0; - int tag; + xa_tag_t tag; /* * We have to hold onto the inode so that ordered extents can do their diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 2a47c2f715bb..71cb9d7fd9c2 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2615,7 +2615,7 @@ static int mpage_prepare_extent_to_map(struct mpage_da_data *mpd) long left = mpd->wbc->nr_to_write; pgoff_t index = mpd->first_page; pgoff_t end = mpd->last_page; - int tag; + xa_tag_t tag; int i, err = 0; int blkbits = mpd->inode->i_blkbits; ext4_lblk_t lblk; diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 412e9f650dac..dfbccf884d4f 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1848,7 +1848,7 @@ static int f2fs_write_cache_pages(struct address_space *mapping, pgoff_t last_idx = ULONG_MAX; int cycled; int range_whole = 0; - int tag; + xa_tag_t tag; pagevec_init(&pvec); diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index f58716567972..8376d1358379 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -371,7 +371,7 @@ static int gfs2_write_cache_jdata(struct address_space *mapping, pgoff_t done_index; int cycled; int range_whole = 0; - int tag; + xa_tag_t tag; pagevec_init(&pvec); if (wbc->range_cyclic) { diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index 6dc456ac6136..955bd6425903 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h @@ -9,6 +9,8 @@ #ifndef _LINUX_PAGEVEC_H #define _LINUX_PAGEVEC_H +#include + /* 15 pointers + header align the pagevec structure to a power of two */ #define PAGEVEC_SIZE 15 @@ -40,12 +42,12 @@ static inline unsigned pagevec_lookup(struct pagevec *pvec, unsigned pagevec_lookup_range_tag(struct pagevec *pvec, struct address_space *mapping, pgoff_t *index, pgoff_t end, - int tag); + xa_tag_t tag); unsigned pagevec_lookup_range_nr_tag(struct pagevec *pvec, struct address_space *mapping, pgoff_t *index, pgoff_t end, - int tag, unsigned max_pages); + xa_tag_t tag, unsigned max_pages); static inline unsigned pagevec_lookup_tag(struct pagevec *pvec, - struct address_space *mapping, pgoff_t *index, int tag) + struct address_space *mapping, pgoff_t *index, xa_tag_t tag) { return pagevec_lookup_range_tag(pvec, mapping, index, (pgoff_t)-1, tag); } diff --git a/mm/swap.c b/mm/swap.c index 79ded98f8c7a..5a217947802c 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -1001,7 +1001,7 @@ EXPORT_SYMBOL(pagevec_lookup_range); unsigned pagevec_lookup_range_tag(struct pagevec *pvec, struct address_space *mapping, pgoff_t *index, pgoff_t end, - int tag) + xa_tag_t tag) { pvec->nr = find_get_pages_range_tag(mapping, index, end, tag, PAGEVEC_SIZE, pvec->pages); @@ -1011,7 +1011,7 @@ EXPORT_SYMBOL(pagevec_lookup_range_tag); unsigned pagevec_lookup_range_nr_tag(struct pagevec *pvec, struct address_space *mapping, pgoff_t *index, pgoff_t end, - int tag, unsigned max_pages) + xa_tag_t tag, unsigned max_pages) { pvec->nr = find_get_pages_range_tag(mapping, index, end, tag, min_t(unsigned int, max_pages, PAGEVEC_SIZE), pvec->pages); -- 2.16.1