fs: use pagevec_lookup_range() in page_cache_seek_hole_data()
authorJan Kara <jack@suse.cz>
Wed, 6 Sep 2017 23:21:37 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 00:27:27 +0000 (17:27 -0700)
commit8338141f0f51325de5fd096e4179d01dac6f3655
treee6e286bacfd213195ff94cc882e4f77b8bff17ec
parent48f2301c07b299f5bcd64563d90215a8ba73e154
fs: use pagevec_lookup_range() in page_cache_seek_hole_data()

We want only pages from given range in page_cache_seek_hole_data().  Use
pagevec_lookup_range() instead of pagevec_lookup() and remove
unnecessary code.

Note that the check for getting less pages than desired can be removed
because index gets updated by pagevec_lookup_range().

Link: http://lkml.kernel.org/r/20170726114704.7626-9-jack@suse.cz
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/buffer.c