]> git.baikalelectronics.ru Git - kernel.git/commit
device-dax: Enable page_mapping()
authorDan Williams <dan.j.williams@intel.com>
Sat, 14 Jul 2018 04:49:40 +0000 (21:49 -0700)
committerDave Jiang <dave.jiang@intel.com>
Fri, 20 Jul 2018 18:20:13 +0000 (11:20 -0700)
commitcc2493ae2fc540aa7a47dbcf0094d9479a24285e
tree2bf5466b3248ef03ff47099e8247753ff2029368
parent372a589e348442b06ef4f3dacb49a3ab4a889006
device-dax: Enable page_mapping()

In support of enabling memory_failure() handling for device-dax
mappings, set the ->mapping association of pages backing device-dax
mappings. The rmap implementation requires page_mapping() to return the
address_space hosting the vmas that map the page.

The ->mapping pointer is never cleared. There is no possibility for the
page to become associated with another address_space while the device is
enabled. When the device is disabled the 'struct page' array for the
device is destroyed / later reinitialized to zero.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/dax/device.c