mm: use find_get_pages_range() in filemap_range_has_page()
authorJan Kara <jack@suse.cz>
Wed, 6 Sep 2017 23:21:40 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Sep 2017 00:27:27 +0000 (17:27 -0700)
commitf7b68046873724129798c405e1a4e326b409c08f
tree10e685a34f8bb0a0603b04a417c72b20c398efeb
parent8338141f0f51325de5fd096e4179d01dac6f3655
mm: use find_get_pages_range() in filemap_range_has_page()

We want only pages from given range in filemap_range_has_page(),
furthermore we want at most a single page.

So use find_get_pages_range() instead of pagevec_lookup() and remove
unnecessary code.

Link: http://lkml.kernel.org/r/20170726114704.7626-10-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>
mm/filemap.c