• Dan Williams's avatar
    device-dax: Enable page_mapping() · 2232c638
    Dan Williams authored
    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: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
    2232c638
device.c 17.6 KB