From patchwork Sun Jun 17 02:00:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10468255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7A115603B4 for ; Sun, 17 Jun 2018 02:02:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69D6B28C2B for ; Sun, 17 Jun 2018 02:02:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E3E928C46; Sun, 17 Jun 2018 02:02:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAE8228C2B for ; Sun, 17 Jun 2018 02:02:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 94D246B0279; Sat, 16 Jun 2018 22:01:10 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8A4146B027F; Sat, 16 Jun 2018 22:01:10 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DA2A6B027E; Sat, 16 Jun 2018 22:01:10 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f69.google.com (mail-pl0-f69.google.com [209.85.160.69]) by kanga.kvack.org (Postfix) with ESMTP id 158926B027F for ; Sat, 16 Jun 2018 22:01:10 -0400 (EDT) Received: by mail-pl0-f69.google.com with SMTP id e1-v6so7646649pld.23 for ; Sat, 16 Jun 2018 19:01:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:in-reply-to:references; bh=Jma1TiXYXgzbd/mOR5mS37ALLbcKLGTSgi/PIzREx/M=; b=NL/06MSRBtp/FusocXMaHZDXy24q3jGTAvR8f0peRl0N8oEG1EP+q8QV0iihDU4Fgd AJRzI9bq5S7+g43ieEC/JBLD3mOzNwu1eZ7EjuH7iq7I7EO5Cwh2eHvZDP4aJLRUcq+9 K3JJR2JyuEQ9tXRuqWPqKvyP7NKkd+YBRr6f0Kd2DsosK1iFiEQZjY+CDZv5k8+nEkJo cxeNnCK2Dt3fBCGvH8YRy37XDwcXhlEabMgVhyA0MZYhXeiCUvWRMDKOhXYz/pM9GIp/ uPnvVnSmy8R0EI4PCSqJcMjklNUww6ht9JYMovv9oCZusfH9jTLXQmXF6ctNHnePSyHy D4eA== X-Gm-Message-State: APt69E0ojvz8zPhQjjAcaWw/52jUMTGTBiCKbFu/uOBI0eoMH6JhpB0U 0Ig+oZmslswk2w87mhtG9M20Xfu4Wec70HwXPgoxAFZGrJFfqB95pVY3cu5y+ixT+AqNHu+YL4d QEFtC7sVWAfQJE05xMUpLDmwVmojTDptvGS1VjQxJjIdnmrUSCBcPq+8pZJpOHx8ktw== X-Received: by 2002:a17:902:14b:: with SMTP id 69-v6mr8456368plb.184.1529200869783; Sat, 16 Jun 2018 19:01:09 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI5NXz64hAkia+brL3v0KHNgzTERrEwYYgcBEaE2yNWECvqcE+qLoqt8wT4gTe6NFkkgQEn X-Received: by 2002:a17:902:14b:: with SMTP id 69-v6mr8456327plb.184.1529200868986; Sat, 16 Jun 2018 19:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529200868; cv=none; d=google.com; s=arc-20160816; b=ihQXlUelDWV+Efxw+EqpXCp0BxlIyyXA3uQtZzXeJhZl8dRvmICrJ7C+6+azb4z3zK clBEhGoNQn2SrS+i4zM0EGnvz0jrW2eiktjTwAzAtoXbehDfPDRipZ7CeC475WQHzT3B bMIFklMvfMyxLAVCLp48hTd1KK7egmUw7zK2zX4a2qIsnwiRk5M/qJ+5IpxeKSQIGoiz x2vNjZWO6sedjqosnsJWBPoVxXeZ1c+/07n6yBPtHMCrjzZ7ve/HK04jrOgxXOs1cBUG nkhtoTQUbGSgTUsvIBu4L8H8gslKyqppxE9/TL9sVpf5Rm1vIOtSrLH+VpWA03nHmouX nuSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=Jma1TiXYXgzbd/mOR5mS37ALLbcKLGTSgi/PIzREx/M=; b=rbEDffOE2+NdHbotSUyieJq0gmeQ1r5HINUg4w0LbAx5zoX8ZPNOjxFVNiEgobgNtz DnfJUhkrGH+c47qoc2o8Ed+dtq3yailxMAPub1RZDVwv12SjrRKioTCDRwJH7nypmcJn GMDyiw1HLpvLntsecG5DkPNNgClYQyEWQHl1bk2tWwlxyclv4yrghFqOI0Vgzr7y4BFT 47n6mRkxGtUTyxiczgqlPPmGmCSI6z1TIc7P3GJ77OeFFNtRypQULOSy4LbJce1heyNu NDv7BCPmQC8G+myLNqwio0TzI6L4oXRdyUZLdj5F+i0LzoVimw7s5uGuPiCbZJKkORpa LdRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=fwWZtttC; spf=pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=willy@infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id e11-v6si13418076pln.161.2018.06.16.19.01.08 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 16 Jun 2018 19:01:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=fwWZtttC; spf=pass (google.com: best guess record for domain of willy@infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=willy@infradead.org 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=Jma1TiXYXgzbd/mOR5mS37ALLbcKLGTSgi/PIzREx/M=; b=fwWZtttCxY+0MmbUgv/KTnqSz 2QxR9WoCQwWJjtieIzUFai9TwYYAJpBFStnrHWuq9wrjhOy/zirnUHLes7qf7jj+ljtnxorPvz5Am YHaBRaeZk8nTfE9bXmAtmAYd4ZXBkTDraDqN/2m1QFHX8leQhEzitQwUeVij6Jbk5OHiHtoTT9TAt 0NQbeAkf7oRDz89TaaYgkNLafY7lj7wA6X2C7/W4KZTnWsIO0mwBYgcofzH1E+FdpZUKcKBbB1LRt bJFhOejTG3H7M0nWxZgz/VghNiH+UINRZDcNCLZJ2PWtbxpP77y2e7iXse8ORK3/AYogrMqNBaqWl eOYDnzEpw==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fUN07-0001NY-TL; Sun, 17 Jun 2018 02:01:07 +0000 From: Matthew Wilcox To: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Matthew Wilcox , Jan Kara , Jeff Layton , Lukas Czerner , Ross Zwisler , Christoph Hellwig , Goldwyn Rodrigues , Nicholas Piggin , Ryusuke Konishi , linux-nilfs@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net Subject: [PATCH v14 46/74] pagevec: Use xa_tag_t Date: Sat, 16 Jun 2018 19:00:24 -0700 Message-Id: <20180617020052.4759-47-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180617020052.4759-1-willy@infradead.org> References: <20180617020052.4759-1-willy@infradead.org> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP 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 cce6087d6880..ac105d97dd81 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3792,7 +3792,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) { @@ -3917,7 +3917,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 38214c05f204..e6c433527dce 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 8f931d699287..e5c0b1e74ce6 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -1942,7 +1942,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 35f5ee23566d..b8609bb1e2e0 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -370,7 +370,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 4c5c7fcc6e46..a7ff602213a9 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -1002,7 +1002,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); @@ -1012,7 +1012,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);