memory_failure_dev_pagemap() at the moment assumes base pages (e.g.
dax_lock_page()). For pagemap with compound pages fetch the
compound_head in case we are handling a tail page memory failure.
Currently this is a nop, but in the advent of compound pages in
dev_pagemap it allows memory_failure_dev_pagemap() to keep working.
Reported-by: Jane Chu <jane.chu(a)oracle.com>
Signed-off-by: Joao Martins <joao.m.martins(a)oracle.com>
mm/memory-failure.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 24210c9bd843..94240d772623 100644
@@ -1318,6 +1318,8 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags,
+ page = compound_head(page);
* Prevent the inode from being freed while we are interrogating
* the address_space, typically this would be handled by