diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index d8d7df82c69a..edfb90e3830c 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -910,9 +910,12 @@ void page_endio(struct page *page, bool is_write, int err) unlock_page(page); } else { if (err) { + struct address_space *mapping; + SetPageError(page); - if (page->mapping) - mapping_set_error(page->mapping, err); + mapping = page_mapping(page); + if (mapping) + mapping_set_error(mapping, err); } end_page_writeback(page); } |