mm/hmm: do not differentiate between empty entry or missing directory
authorJérôme Glisse <jglisse@redhat.com>
Tue, 10 Apr 2018 23:28:46 +0000 (16:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Apr 2018 17:28:30 +0000 (10:28 -0700)
commit5504ed29692faad06ea74c4275e96a8ffc83a1e1
treefc5b15aa9076aeedd248c339b442ca7ad5c372e7
parent855ce7d2525c97cf706ad82a419f0c2d632b9481
mm/hmm: do not differentiate between empty entry or missing directory

There is no point in differentiating between a range for which there is
not even a directory (and thus entries) and empty entry (pte_none() or
pmd_none() returns true).

Simply drop the distinction ie remove HMM_PFN_EMPTY flag and merge now
duplicate hmm_vma_walk_hole() and hmm_vma_walk_clear() functions.

Link: http://lkml.kernel.org/r/20180323005527.758-11-jglisse@redhat.com
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Cc: Evgeny Baskakov <ebaskakov@nvidia.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: Mark Hairgrove <mhairgrove@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/hmm.h
mm/hmm.c