mm/hmm: improve and rename hmm_vma_get_pfns() to hmm_range_snapshot()

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 <>
Reviewed-by: John Hubbard <>
Reviewed-by: Ira Weiny <>
Cc: Dan Williams <>
Cc: Arnd Bergmann <>
Cc: Balbir Singh <>
Cc: Dan Carpenter <>
Cc: Matthew Wilcox <>
Cc: Souptick Joarder <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
3 files changed