[04/25] mm: don't clear ->mapping in hmm_devmem_free

Submitted by Christoph Hellwig on June 17, 2019, 12:27 p.m.


Message ID 20190617122733.22432-5-hch@lst.de
State New
Headers show
Series "dev_pagemap related cleanups v2" ( rev: 2 1 ) in Nouveau

Not browsing as part of any series.

Commit Message

Christoph Hellwig June 17, 2019, 12:27 p.m.
->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>
 mm/hmm.c | 2 --
 1 file changed, 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/mm/hmm.c b/mm/hmm.c
index dc251c51803a..64e788bb1211 100644
--- a/mm/hmm.c
+++ b/mm/hmm.c
@@ -1380,8 +1380,6 @@  static void hmm_devmem_free(struct page *page, void *data)
 	struct hmm_devmem *devmem = data;
-	page->mapping = NULL;
 	devmem->ops->free(devmem, page);