aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index c11418dd94e8..88611928e71f 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -54,9 +54,8 @@
54 * 54 *
55 * ->i_mmap_lock (vmtruncate) 55 * ->i_mmap_lock (vmtruncate)
56 * ->private_lock (__free_pte->__set_page_dirty_buffers) 56 * ->private_lock (__free_pte->__set_page_dirty_buffers)
57 * ->swap_list_lock 57 * ->swap_lock (exclusive_swap_page, others)
58 * ->swap_device_lock (exclusive_swap_page, others) 58 * ->mapping->tree_lock
59 * ->mapping->tree_lock
60 * 59 *
61 * ->i_sem 60 * ->i_sem
62 * ->i_mmap_lock (truncate->unmap_mapping_range) 61 * ->i_mmap_lock (truncate->unmap_mapping_range)
@@ -86,7 +85,7 @@
86 * ->page_table_lock (anon_vma_prepare and various) 85 * ->page_table_lock (anon_vma_prepare and various)
87 * 86 *
88 * ->page_table_lock 87 * ->page_table_lock
89 * ->swap_device_lock (try_to_unmap_one) 88 * ->swap_lock (try_to_unmap_one)
90 * ->private_lock (try_to_unmap_one) 89 * ->private_lock (try_to_unmap_one)
91 * ->tree_lock (try_to_unmap_one) 90 * ->tree_lock (try_to_unmap_one)
92 * ->zone.lru_lock (follow_page->mark_page_accessed) 91 * ->zone.lru_lock (follow_page->mark_page_accessed)
@@ -1505,8 +1504,12 @@ repeat:
1505 return -EINVAL; 1504 return -EINVAL;
1506 1505
1507 page = filemap_getpage(file, pgoff, nonblock); 1506 page = filemap_getpage(file, pgoff, nonblock);
1507
1508 /* XXX: This is wrong, a filesystem I/O error may have happened. Fix that as
1509 * done in shmem_populate calling shmem_getpage */
1508 if (!page && !nonblock) 1510 if (!page && !nonblock)
1509 return -ENOMEM; 1511 return -ENOMEM;
1512
1510 if (page) { 1513 if (page) {
1511 err = install_page(mm, vma, addr, page, prot); 1514 err = install_page(mm, vma, addr, page, prot);
1512 if (err) { 1515 if (err) {
@@ -1514,6 +1517,9 @@ repeat:
1514 return err; 1517 return err;
1515 } 1518 }
1516 } else { 1519 } else {
1520 /* No page was found just because we can't read it in now (being
1521 * here implies nonblock != 0), but the page may exist, so set
1522 * the PTE to fault it in later. */
1517 err = install_file_pte(mm, vma, addr, pgoff, prot); 1523 err = install_file_pte(mm, vma, addr, pgoff, prot);
1518 if (err) 1524 if (err)
1519 return err; 1525 return err;