]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
pagevec: Use xa_mark_t
authorMatthew Wilcox <willy@infradead.org>
Tue, 5 Dec 2017 22:30:38 +0000 (17:30 -0500)
committerMatthew Wilcox <willy@infradead.org>
Sun, 21 Oct 2018 14:46:39 +0000 (10:46 -0400)
Removes sparse warnings.

Signed-off-by: Matthew Wilcox <willy@infradead.org>
fs/btrfs/extent_io.c
fs/ext4/inode.c
fs/f2fs/data.c
fs/gfs2/aops.c
include/linux/pagevec.h
mm/swap.c

index 4dd6faab02bb5b58ef321003a76a6d2594fb7234..fc7ca7d991ad5d567e42c109846cb0a8b3f1e6d8 100644 (file)
@@ -3778,7 +3778,7 @@ int btree_write_cache_pages(struct address_space *mapping,
        pgoff_t index;
        pgoff_t end;            /* Inclusive */
        int scanned = 0;
-       int tag;
+       xa_mark_t tag;
 
        pagevec_init(&pvec);
        if (wbc->range_cyclic) {
@@ -3903,7 +3903,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_mark_t tag;
 
        /*
         * We have to hold onto the inode so that ordered extents can do their
index d767e993591d93f335ae85b876a5c12ceae35b7a..57bad3edfbed3d561e3c6819934de5328cd2c10a 100644 (file)
@@ -2613,7 +2613,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_mark_t tag;
        int i, err = 0;
        int blkbits = mpd->inode->i_blkbits;
        ext4_lblk_t lblk;
index 382c1ef9a9e4d6e9df05e39031ce0f5958e51663..5b760809eecccbe4b644ed8176ce226a56cecb31 100644 (file)
@@ -2003,7 +2003,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_mark_t tag;
 
        pagevec_init(&pvec);
 
index 31e8270d0b2661405be1ab6dff3ac3833030fda8..8afbb35559b9f1094981a664bd92b97551778640 100644 (file)
@@ -366,7 +366,7 @@ static int gfs2_write_cache_jdata(struct address_space *mapping,
        pgoff_t done_index;
        int cycled;
        int range_whole = 0;
-       int tag;
+       xa_mark_t tag;
 
        pagevec_init(&pvec);
        if (wbc->range_cyclic) {
index 6dc456ac6136b9409af5bfa6eefe30a60b0cd904..081d934eda640eed692b805084380a765cda2214 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef _LINUX_PAGEVEC_H
 #define _LINUX_PAGEVEC_H
 
+#include <linux/xarray.h>
+
 /* 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_mark_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_mark_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_mark_t tag)
 {
        return pagevec_lookup_range_tag(pvec, mapping, index, (pgoff_t)-1, tag);
 }
index 4c5c7fcc6e46566ebbb2246c89460dbee6adc637..6861f3140a13a966267bb71477286b0c6ad41d42 100644 (file)
--- 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_mark_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_mark_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);