From: Ralph Campbell <[email protected]> In hmm_range_register(), the call to hmm_get_or_create() implies that hmm_range_register() could be called before hmm_mirror_register() when in fact, that would violate the HMM API.
Use mm_get_hmm() instead of hmm_get_or_create() to get the HMM structure. Signed-off-by: Ralph Campbell <[email protected]> Cc: John Hubbard <[email protected]> Cc: Ira Weiny <[email protected]> Cc: Dan Williams <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Souptick Joarder <[email protected]> Cc: Andrew Morton <[email protected]> --- mm/hmm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hmm.c b/mm/hmm.c index f6c4c8633db9..2aa75dbed04a 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -936,7 +936,7 @@ int hmm_range_register(struct hmm_range *range, range->start = start; range->end = end; - range->hmm = hmm_get_or_create(mm); + range->hmm = mm_get_hmm(mm); if (!range->hmm) return -EFAULT; -- 2.20.1

