*/
int generic_error_remove_page(struct address_space *mapping, struct page *page)
{
+ struct inode *inode;
+
if (!mapping)
return -EINVAL;
+ inode = mapping->host;
/*
* Only punch for normal data pages for now.
* Handling other types like directories would need more auditing.
*/
- if (!S_ISREG(mapping->host->i_mode))
+ if (!S_ISREG(inode->i_mode))
return -EIO;
+ pr_info("MCE %#lx: file info pgoff:%lu, inode:%lu, dev:%s\n",
+ page_to_pfn(page), page_index(page),
+ inode->i_ino, inode->i_sb->s_id);
return truncate_inode_page(mapping, page);
}
EXPORT_SYMBOL(generic_error_remove_page);