Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3962b4cd authored by Jan Kara's avatar Jan Kara Committed by Jaegeuk Kim
Browse files

ceph: use pagevec_lookup_range_nr_tag()

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: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Reviewed-by: default avatarDaniel Jordan <daniel.m.jordan@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8d4fb49e
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -758,8 +758,7 @@ retry:
		struct page **pages = NULL;
		mempool_t *pool = NULL;	/* Becomes non-null if mempool used */
		struct page *page;
		int want;
		u64 offset, len;
		u64 offset = 0, len = 0;
		long writeback_stat;

		next = 0;
@@ -768,13 +767,9 @@ retry:

get_more_pages:
		first = -1;
		want = min(end - index,
			   min((pgoff_t)PAGEVEC_SIZE,
			       max_pages - (pgoff_t)locked_pages) - 1)
			+ 1;
		pvec_pages = pagevec_lookup_range_tag(&pvec, mapping, &index,
						end, PAGECACHE_TAG_DIRTY,
						want);
						max_pages - locked_pages);
		dout("pagevec_lookup_range_tag got %d\n", pvec_pages);
		if (!pvec_pages && !locked_pages)
			break;