diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/Kconfig | 4 | ||||
-rw-r--r-- | mm/bootmem.c | 2 | ||||
-rw-r--r-- | mm/fadvise.c | 2 | ||||
-rw-r--r-- | mm/filemap.c | 3 | ||||
-rw-r--r-- | mm/hugetlb.c | 23 | ||||
-rw-r--r-- | mm/page-writeback.c | 2 | ||||
-rw-r--r-- | mm/page_alloc.c | 2 | ||||
-rw-r--r-- | mm/pdflush.c | 2 | ||||
-rw-r--r-- | mm/readahead.c | 2 | ||||
-rw-r--r-- | mm/truncate.c | 2 |
10 files changed, 28 insertions, 16 deletions
diff --git a/mm/Kconfig b/mm/Kconfig index 91ee3922510a..1a501a4de95c 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -101,7 +101,7 @@ config HAVE_MEMORY_PRESENT | |||
101 | # with gcc 3.4 and later. | 101 | # with gcc 3.4 and later. |
102 | # | 102 | # |
103 | config SPARSEMEM_STATIC | 103 | config SPARSEMEM_STATIC |
104 | def_bool n | 104 | bool |
105 | 105 | ||
106 | # | 106 | # |
107 | # Architecture platforms which require a two level mem_section in SPARSEMEM | 107 | # Architecture platforms which require a two level mem_section in SPARSEMEM |
@@ -113,7 +113,7 @@ config SPARSEMEM_EXTREME | |||
113 | depends on SPARSEMEM && !SPARSEMEM_STATIC | 113 | depends on SPARSEMEM && !SPARSEMEM_STATIC |
114 | 114 | ||
115 | config SPARSEMEM_VMEMMAP_ENABLE | 115 | config SPARSEMEM_VMEMMAP_ENABLE |
116 | def_bool n | 116 | bool |
117 | 117 | ||
118 | config SPARSEMEM_VMEMMAP | 118 | config SPARSEMEM_VMEMMAP |
119 | bool "Sparse Memory virtual memmap" | 119 | bool "Sparse Memory virtual memmap" |
diff --git a/mm/bootmem.c b/mm/bootmem.c index ad8eec6e44a8..ac5a891f142a 100644 --- a/mm/bootmem.c +++ b/mm/bootmem.c | |||
@@ -48,7 +48,7 @@ early_param("bootmem_debug", bootmem_debug_setup); | |||
48 | if (unlikely(bootmem_debug)) \ | 48 | if (unlikely(bootmem_debug)) \ |
49 | printk(KERN_INFO \ | 49 | printk(KERN_INFO \ |
50 | "bootmem::%s " fmt, \ | 50 | "bootmem::%s " fmt, \ |
51 | __FUNCTION__, ## args); \ | 51 | __func__, ## args); \ |
52 | }) | 52 | }) |
53 | 53 | ||
54 | static unsigned long __init bootmap_bytes(unsigned long pages) | 54 | static unsigned long __init bootmap_bytes(unsigned long pages) |
diff --git a/mm/fadvise.c b/mm/fadvise.c index 343cfdfebd9e..a1da969bd980 100644 --- a/mm/fadvise.c +++ b/mm/fadvise.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2002, Linus Torvalds | 4 | * Copyright (C) 2002, Linus Torvalds |
5 | * | 5 | * |
6 | * 11Jan2003 akpm@digeo.com | 6 | * 11Jan2003 Andrew Morton |
7 | * Initial version. | 7 | * Initial version. |
8 | */ | 8 | */ |
9 | 9 | ||
diff --git a/mm/filemap.c b/mm/filemap.c index 494ff20b6cfa..903bf316912a 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1187,8 +1187,7 @@ out: | |||
1187 | ra->prev_pos |= prev_offset; | 1187 | ra->prev_pos |= prev_offset; |
1188 | 1188 | ||
1189 | *ppos = ((loff_t)index << PAGE_CACHE_SHIFT) + offset; | 1189 | *ppos = ((loff_t)index << PAGE_CACHE_SHIFT) + offset; |
1190 | if (filp) | 1190 | file_accessed(filp); |
1191 | file_accessed(filp); | ||
1192 | } | 1191 | } |
1193 | 1192 | ||
1194 | int file_read_actor(read_descriptor_t *desc, struct page *page, | 1193 | int file_read_actor(read_descriptor_t *desc, struct page *page, |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 67a71191136e..38633864a93e 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2008,7 +2008,7 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2008 | entry = huge_ptep_get(ptep); | 2008 | entry = huge_ptep_get(ptep); |
2009 | if (huge_pte_none(entry)) { | 2009 | if (huge_pte_none(entry)) { |
2010 | ret = hugetlb_no_page(mm, vma, address, ptep, write_access); | 2010 | ret = hugetlb_no_page(mm, vma, address, ptep, write_access); |
2011 | goto out_unlock; | 2011 | goto out_mutex; |
2012 | } | 2012 | } |
2013 | 2013 | ||
2014 | ret = 0; | 2014 | ret = 0; |
@@ -2024,7 +2024,7 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2024 | if (write_access && !pte_write(entry)) { | 2024 | if (write_access && !pte_write(entry)) { |
2025 | if (vma_needs_reservation(h, vma, address) < 0) { | 2025 | if (vma_needs_reservation(h, vma, address) < 0) { |
2026 | ret = VM_FAULT_OOM; | 2026 | ret = VM_FAULT_OOM; |
2027 | goto out_unlock; | 2027 | goto out_mutex; |
2028 | } | 2028 | } |
2029 | 2029 | ||
2030 | if (!(vma->vm_flags & VM_SHARED)) | 2030 | if (!(vma->vm_flags & VM_SHARED)) |
@@ -2034,10 +2034,23 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2034 | 2034 | ||
2035 | spin_lock(&mm->page_table_lock); | 2035 | spin_lock(&mm->page_table_lock); |
2036 | /* Check for a racing update before calling hugetlb_cow */ | 2036 | /* Check for a racing update before calling hugetlb_cow */ |
2037 | if (likely(pte_same(entry, huge_ptep_get(ptep)))) | 2037 | if (unlikely(!pte_same(entry, huge_ptep_get(ptep)))) |
2038 | if (write_access && !pte_write(entry)) | 2038 | goto out_page_table_lock; |
2039 | |||
2040 | |||
2041 | if (write_access) { | ||
2042 | if (!pte_write(entry)) { | ||
2039 | ret = hugetlb_cow(mm, vma, address, ptep, entry, | 2043 | ret = hugetlb_cow(mm, vma, address, ptep, entry, |
2040 | pagecache_page); | 2044 | pagecache_page); |
2045 | goto out_page_table_lock; | ||
2046 | } | ||
2047 | entry = pte_mkdirty(entry); | ||
2048 | } | ||
2049 | entry = pte_mkyoung(entry); | ||
2050 | if (huge_ptep_set_access_flags(vma, address, ptep, entry, write_access)) | ||
2051 | update_mmu_cache(vma, address, entry); | ||
2052 | |||
2053 | out_page_table_lock: | ||
2041 | spin_unlock(&mm->page_table_lock); | 2054 | spin_unlock(&mm->page_table_lock); |
2042 | 2055 | ||
2043 | if (pagecache_page) { | 2056 | if (pagecache_page) { |
@@ -2045,7 +2058,7 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2045 | put_page(pagecache_page); | 2058 | put_page(pagecache_page); |
2046 | } | 2059 | } |
2047 | 2060 | ||
2048 | out_unlock: | 2061 | out_mutex: |
2049 | mutex_unlock(&hugetlb_instantiation_mutex); | 2062 | mutex_unlock(&hugetlb_instantiation_mutex); |
2050 | 2063 | ||
2051 | return ret; | 2064 | return ret; |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 24de8b65fdbd..c130a137c129 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Contains functions related to writing back dirty pages at the | 7 | * Contains functions related to writing back dirty pages at the |
8 | * address_space level. | 8 | * address_space level. |
9 | * | 9 | * |
10 | * 10Apr2002 akpm@zip.com.au | 10 | * 10Apr2002 Andrew Morton |
11 | * Initial version | 11 | * Initial version |
12 | */ | 12 | */ |
13 | 13 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 27b8681139fd..9eb9eb928285 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -3952,7 +3952,7 @@ static void check_for_regular_memory(pg_data_t *pgdat) | |||
3952 | void __init free_area_init_nodes(unsigned long *max_zone_pfn) | 3952 | void __init free_area_init_nodes(unsigned long *max_zone_pfn) |
3953 | { | 3953 | { |
3954 | unsigned long nid; | 3954 | unsigned long nid; |
3955 | enum zone_type i; | 3955 | int i; |
3956 | 3956 | ||
3957 | /* Sort early_node_map as initialisation assumes it is sorted */ | 3957 | /* Sort early_node_map as initialisation assumes it is sorted */ |
3958 | sort_node_map(); | 3958 | sort_node_map(); |
diff --git a/mm/pdflush.c b/mm/pdflush.c index 0cbe0c60c6bf..a0a14c4d5072 100644 --- a/mm/pdflush.c +++ b/mm/pdflush.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2002, Linus Torvalds. | 4 | * Copyright (C) 2002, Linus Torvalds. |
5 | * | 5 | * |
6 | * 09Apr2002 akpm@zip.com.au | 6 | * 09Apr2002 Andrew Morton |
7 | * Initial version | 7 | * Initial version |
8 | * 29Feb2004 kaos@sgi.com | 8 | * 29Feb2004 kaos@sgi.com |
9 | * Move worker thread creation to kthread to avoid chewing | 9 | * Move worker thread creation to kthread to avoid chewing |
diff --git a/mm/readahead.c b/mm/readahead.c index 77e8ddf945e9..6cbd9a72fde2 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2002, Linus Torvalds | 4 | * Copyright (C) 2002, Linus Torvalds |
5 | * | 5 | * |
6 | * 09Apr2002 akpm@zip.com.au | 6 | * 09Apr2002 Andrew Morton |
7 | * Initial version. | 7 | * Initial version. |
8 | */ | 8 | */ |
9 | 9 | ||
diff --git a/mm/truncate.c b/mm/truncate.c index 6650c1d878b4..e83e4b114ef1 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2002, Linus Torvalds | 4 | * Copyright (C) 2002, Linus Torvalds |
5 | * | 5 | * |
6 | * 10Sep2002 akpm@zip.com.au | 6 | * 10Sep2002 Andrew Morton |
7 | * Initial version. | 7 | * Initial version. |
8 | */ | 8 | */ |
9 | 9 | ||