aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index c588d1222b2a..69f75c77c098 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -865,9 +865,12 @@ void page_endio(struct page *page, int rw, int err)
865 unlock_page(page); 865 unlock_page(page);
866 } else { /* rw == WRITE */ 866 } else { /* rw == WRITE */
867 if (err) { 867 if (err) {
868 struct address_space *mapping;
869
868 SetPageError(page); 870 SetPageError(page);
869 if (page->mapping) 871 mapping = page_mapping(page);
870 mapping_set_error(page->mapping, err); 872 if (mapping)
873 mapping_set_error(mapping, err);
871 } 874 }
872 end_page_writeback(page); 875 end_page_writeback(page);
873 } 876 }
@@ -1559,6 +1562,11 @@ static ssize_t do_generic_file_read(struct file *filp, loff_t *ppos,
1559 1562
1560 cond_resched(); 1563 cond_resched();
1561find_page: 1564find_page:
1565 if (fatal_signal_pending(current)) {
1566 error = -EINTR;
1567 goto out;
1568 }
1569
1562 page = find_get_page(mapping, index); 1570 page = find_get_page(mapping, index);
1563 if (!page) { 1571 if (!page) {
1564 page_cache_sync_readahead(mapping, 1572 page_cache_sync_readahead(mapping,