From: Christoph Hellwig Date: Wed, 26 Jun 2019 12:27:04 +0000 (+0200) Subject: mm: don't clear ->mapping in hmm_devmem_free X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b7a523109fb5c9d2d6dd3ffc1fa38a4f48c6f842;p=linux.git mm: don't clear ->mapping in hmm_devmem_free ->mapping isn't even used by HMM users, and the field at the same offset in the zone_device part of the union is declared as pad. (Which btw is rather confusing, as DAX uses ->pgmap and ->mapping from two different sides of the union, but DAX doesn't use hmm_devmem_free). Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Dan Williams Signed-off-by: Jason Gunthorpe --- diff --git a/mm/hmm.c b/mm/hmm.c index 376159a769fbe..e7dd2ab8f9ab0 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -1383,8 +1383,6 @@ static void hmm_devmem_free(struct page *page, void *data) { struct hmm_devmem *devmem = data; - page->mapping = NULL; - devmem->ops->free(devmem, page); }