1
0
Fork 0

f2fs: use pagevec_lookup_range_tag()

We want only pages from given range in f2fs_write_cache_pages().  Use
pagevec_lookup_range_tag() instead of pagevec_lookup_tag() and remove
unnecessary code.

Link: http://lkml.kernel.org/r/20171009151359.31984-6-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
hifive-unleashed-5.1
Jan Kara 2017-11-15 17:34:48 -08:00 committed by Linus Torvalds
parent dc7f3e868a
commit 69c4f35d25
1 changed files with 2 additions and 7 deletions

View File

@ -1669,8 +1669,8 @@ retry:
while (!done && (index <= end)) {
int i;
nr_pages = pagevec_lookup_tag(&pvec, mapping, &index, tag,
min(end - index, (pgoff_t)PAGEVEC_SIZE - 1) + 1);
nr_pages = pagevec_lookup_range_tag(&pvec, mapping, &index, end,
tag, PAGEVEC_SIZE);
if (nr_pages == 0)
break;
@ -1678,11 +1678,6 @@ retry:
struct page *page = pvec.pages[i];
bool submitted = false;
if (page->index > end) {
done = 1;
break;
}
done_index = page->index;
retry_write:
lock_page(page);