mm/hmm: improve and rename hmm_vma_fault() to hmm_range_fault()

Minor optimization around hmm_pte_need_fault().  Rename for consistency
between code, comments and documentation.  Also improves the comments on
all the possible returns values.  Improve the function by returning the
number of populated entries in pfns array.

Signed-off-by: Jérôme Glisse <>
Reviewed-by: Ralph Campbell <>
Cc: John Hubbard <>
Cc: Dan Williams <>
Cc: Arnd Bergmann <>
Cc: Balbir Singh <>
Cc: Dan Carpenter <>
Cc: Ira Weiny <>
Cc: Matthew Wilcox <>
Cc: Souptick Joarder <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
3 files changed