ceph: use pagevec_lookup_range_nr_tag()
authorJan Kara <jack@suse.cz>
Thu, 16 Nov 2017 01:35:16 +0000 (17:35 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Nov 2017 02:21:04 +0000 (18:21 -0800)
Use new function for looking up pages since nr_pages argument from
pagevec_lookup_range_tag() is going away.

Link: http://lkml.kernel.org/r/20171009151359.31984-14-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ceph/addr.c

index 1af5cc899cb46f2fbfe79f268189dd9da3588ad0..0fc2987cb62d74f99876856d073d40054df4ef26 100644 (file)
@@ -870,11 +870,9 @@ retry:
                max_pages = wsize >> PAGE_SHIFT;
 
 get_more_pages:
-               pvec_pages = min_t(unsigned, PAGEVEC_SIZE,
-                                  max_pages - locked_pages);
-               pvec_pages = pagevec_lookup_range_tag(&pvec, mapping, &index,
+               pvec_pages = pagevec_lookup_range_nr_tag(&pvec, mapping, &index,
                                                end, PAGECACHE_TAG_DIRTY,
-                                               pvec_pages);
+                                               max_pages - locked_pages);
                dout("pagevec_lookup_range_tag got %d\n", pvec_pages);
                if (!pvec_pages && !locked_pages)
                        break;