mm/hmm: do not erase snapshot when a range is invalidated

Users of HMM might be using the snapshot information to do preparatory
step like dma mapping pages to a device before checking for invalidation
through hmm_vma_range_done() so do not erase that information and assume
users will do the right thing.

Signed-off-by: Jérôme Glisse <>
Reviewed-by: Ralph Campbell <>
Reviewed-by: 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 <>
1 file changed