]> git.baikalelectronics.ru Git - kernel.git/commit
device-dax: Set page->index
authorDan Williams <dan.j.williams@intel.com>
Sat, 14 Jul 2018 04:49:45 +0000 (21:49 -0700)
committerDave Jiang <dave.jiang@intel.com>
Fri, 20 Jul 2018 18:20:44 +0000 (11:20 -0700)
commitb979e94074092cd92fd2161e4094cc6745ff453c
treedd0cb081bd17cdab0c2e3f119d2fac2493423e83
parentcc2493ae2fc540aa7a47dbcf0094d9479a24285e
device-dax: Set page->index

In support of enabling memory_failure() handling for device-dax
mappings, set ->index to the pgoff of the page. The rmap implementation
requires ->index to bound the search through the vma interval tree.

The ->index value is never cleared. There is no possibility for the
page to become associated with another pgoff while the device is
enabled. When the device is disabled the 'struct page' array for the
device is destroyed and ->index is 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