From patchwork Mon Jun 11 14:06:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10457967 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 2A4F26020F for ; Mon, 11 Jun 2018 14:09:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 184BD2835B for ; Mon, 11 Jun 2018 14:09:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D23A28451; Mon, 11 Jun 2018 14:09:54 +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 796B12835B for ; Mon, 11 Jun 2018 14:09:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CCC136B028C; Mon, 11 Jun 2018 10:07:03 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C29EE6B028D; Mon, 11 Jun 2018 10:07:03 -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 AA3726B028E; Mon, 11 Jun 2018 10:07:03 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f72.google.com (mail-pl0-f72.google.com [209.85.160.72]) by kanga.kvack.org (Postfix) with ESMTP id 5F1766B028C for ; Mon, 11 Jun 2018 10:07:03 -0400 (EDT) Received: by mail-pl0-f72.google.com with SMTP id t17-v6so12213774ply.13 for ; Mon, 11 Jun 2018 07:07:03 -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=qEWuPFtwu1wKHPY5+RYCC+du5tnmgVj7Blxh6g8XNsw=; b=eS8jR5O2J1g/+pKHLGnKU/OueEC+laew1psoGoJfsrnFoN5M/h3k8XZNY1tHWuZtQL p3/VDG3JTLmN+9crDaOp+90BkOzQ7VVcDySA5CF8oD7l0wmWm95XHb5Ci7RqW6/8BSbp m6qCfE0zrKKFB6ZXasID3VaarnrZ8tp0hinnt2H84OhF12d8yrpFA6wF2nERLCoondmh sC+ezLpqYqPlw7lYTFcn0M1RCE1AaMQQUIVvcGXtRf3LFUa+3uPNHhw7GxF2PkXYIJ4g kZpTg1xicI1MsCWa/CDO0T4vQlpuv9eJAahX6ELJ3l9u4NpTbLCsCwkd0LBRnwCsgAHw CcNg== X-Gm-Message-State: APt69E1JhgG4pqpndTJdSqNOaNz2glYsOpHNzUskB9oFKvvTVTMP5bRP ckgCDSmcelS+7/MNBYn5hnWwJVEaNT3XPjjE0g42MxXoeemmKZgpaT2vq0MuPVFPVdD2CtNakOn ULwJ09Abng514bErUUnWbYAIs7yEf+MZTTHGbywTi3oX9d8vC9tkJX5UFHVcekrFqEw== X-Received: by 2002:a62:ec5b:: with SMTP id k88-v6mr17414935pfh.85.1528726023044; Mon, 11 Jun 2018 07:07:03 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJfKWtyPXNSu7sraCpLiWfK98/9/SNNPRM4jjWYgQSNuT0+eH8/SYZ+XgTAp8HgHoqrNDl/ X-Received: by 2002:a62:ec5b:: with SMTP id k88-v6mr17414874pfh.85.1528726022247; Mon, 11 Jun 2018 07:07:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528726022; cv=none; d=google.com; s=arc-20160816; b=eLdlZXZp7NWaAiVQofH+726JxZ0UDAzUMo3UQnqViklBFneNMOP5XMkoRoYsQeVLZm YQXkg2P8hh6rd9WmgnbGWByTqmFyFdh9oCYurVoDgMAelaTqAWN4pPNt+mik0VGAqv5O ayQAEFeSvhC3bK/vver/ildfy3w0PKS8iUgimB8faLyBcSguHlfgmRkHiUOy7aHKUUvK XUyZNUAyFw6h88QU891KgJr4NVaWeSjttBwfcazz/d1QVO1plHNFBqmuXtKQR4B+aUpC Zxb0aoXdwaU1QkJ/l+ei/HEBiM4PhOlZH79HgOnclGEZa5Idlan9XdcOfmnPj50F6DwI 62FQ== 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=qEWuPFtwu1wKHPY5+RYCC+du5tnmgVj7Blxh6g8XNsw=; b=IMEOy1ps9urtgFm6Xg82dEQDUJrC50H00t303h4NO62mNQb+EY4NWPQum8yfrOoaEm PCJVFadG5tfMBuGPcSeMdkfFoum7qnZGPdPn4SoZp4wFa7zUgmqS0rmf7SNAsFjFpI/9 HnQwj7IQhb1JdfrqCWCPCxas6UxPhyS2iFjxtGFBKYRTGW98tfcOiycBZvDxaZ1riGd/ 5DvIPCYaFKJURCEedelbsdmbbBvh8kGnBKo7HI8JcJkgeT767SfUH+E2iEleMhYkY5Qm I3kKQnx6i3EDApJvDzsWirYz9CczdraBvM+KLeB/+QDDDbiIHswx6++7SjNG5Sq1JmAF QuZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=aDVM7nnD; 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 33-v6si43802736plf.133.2018.06.11.07.07.02 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jun 2018 07:07:02 -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=aDVM7nnD; 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=qEWuPFtwu1wKHPY5+RYCC+du5tnmgVj7Blxh6g8XNsw=; b=aDVM7nnDLIKJT3boYA9cuYrjl LdJrs80uJk6xn4yWHOCHfmPszqTRe2T5ek74FRMe09UqlF36WwIEv4Zj51BJQJj2HXU3L7yW+7R0A DkhBAKUdV2jNApXMYNAKb7SxrFAHAo2BB5mx2qBWCqxasE8lt9dZa8dnLuNo/p8vdfJa1OGjV6zjn XJ2AU49DD6Z8Ka1jkhTdm1iQRr20nWOpUJSakotFnVPqq6hauSpL08p7kARvVvJscqEW2gKRnYmYP M0d1ESFe2Q/T55mBXgkf6Q3tutW6EYl6/kwO4pGJGUNM0zZe4RgJ7/u2Opw58Cel5pd5f89J9KO2A GE+kD+i0w==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fSNTJ-0004pq-2E; Mon, 11 Jun 2018 14:07:01 +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 v13 45/72] pagevec: Use xa_tag_t Date: Mon, 11 Jun 2018 07:06:12 -0700 Message-Id: <20180611140639.17215-46-willy@infradead.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180611140639.17215-1-willy@infradead.org> References: <20180611140639.17215-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 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 53829afc2a6e..489fe673fbba 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);