mm: don't clear ->mapping in hmm_devmem_free
authorChristoph Hellwig <hch@lst.de>
Wed, 26 Jun 2019 12:27:04 +0000 (14:27 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 2 Jul 2019 17:32:44 +0000 (14:32 -0300)
->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 <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
mm/hmm.c

index 376159a769fbe59ba8f87f010037406ef6d20c89..e7dd2ab8f9ab0319b190f6159bc04c1faa2de9b8 100644 (file)
--- 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);
 }