diff options
| author | Joel Becker <jlbec@evilplan.org> | 2011-05-26 00:51:55 -0400 |
|---|---|---|
| committer | Joel Becker <jlbec@evilplan.org> | 2011-05-26 00:51:55 -0400 |
| commit | ece928df16494becd43f999aff9bd530182e7e81 (patch) | |
| tree | 905042764ea5d8ab6eda63666406e19f607bcf4c /mm | |
| parent | 3d1c1829ebe7e8bb48a997b39b4865abc9197e5e (diff) | |
| parent | dda54e76d7dba0532ebdd72e0b4f492a03f83225 (diff) | |
Merge branch 'move_extents' of git://oss.oracle.com/git/tye/linux-2.6 into ocfs2-merge-window
Conflicts:
fs/ocfs2/ioctl.c
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/percpu.c | 6 | ||||
| -rw-r--r-- | mm/rmap.c | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/mm/percpu.c b/mm/percpu.c index a160db39b81..bf80e55dbed 100644 --- a/mm/percpu.c +++ b/mm/percpu.c | |||
| @@ -1215,8 +1215,10 @@ int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, | |||
| 1215 | PCPU_SETUP_BUG_ON(ai->nr_groups <= 0); | 1215 | PCPU_SETUP_BUG_ON(ai->nr_groups <= 0); |
| 1216 | #ifdef CONFIG_SMP | 1216 | #ifdef CONFIG_SMP |
| 1217 | PCPU_SETUP_BUG_ON(!ai->static_size); | 1217 | PCPU_SETUP_BUG_ON(!ai->static_size); |
| 1218 | PCPU_SETUP_BUG_ON((unsigned long)__per_cpu_start & ~PAGE_MASK); | ||
| 1218 | #endif | 1219 | #endif |
| 1219 | PCPU_SETUP_BUG_ON(!base_addr); | 1220 | PCPU_SETUP_BUG_ON(!base_addr); |
| 1221 | PCPU_SETUP_BUG_ON((unsigned long)base_addr & ~PAGE_MASK); | ||
| 1220 | PCPU_SETUP_BUG_ON(ai->unit_size < size_sum); | 1222 | PCPU_SETUP_BUG_ON(ai->unit_size < size_sum); |
| 1221 | PCPU_SETUP_BUG_ON(ai->unit_size & ~PAGE_MASK); | 1223 | PCPU_SETUP_BUG_ON(ai->unit_size & ~PAGE_MASK); |
| 1222 | PCPU_SETUP_BUG_ON(ai->unit_size < PCPU_MIN_UNIT_SIZE); | 1224 | PCPU_SETUP_BUG_ON(ai->unit_size < PCPU_MIN_UNIT_SIZE); |
| @@ -1645,8 +1647,8 @@ int __init pcpu_embed_first_chunk(size_t reserved_size, size_t dyn_size, | |||
| 1645 | /* warn if maximum distance is further than 75% of vmalloc space */ | 1647 | /* warn if maximum distance is further than 75% of vmalloc space */ |
| 1646 | if (max_distance > (VMALLOC_END - VMALLOC_START) * 3 / 4) { | 1648 | if (max_distance > (VMALLOC_END - VMALLOC_START) * 3 / 4) { |
| 1647 | pr_warning("PERCPU: max_distance=0x%zx too large for vmalloc " | 1649 | pr_warning("PERCPU: max_distance=0x%zx too large for vmalloc " |
| 1648 | "space 0x%lx\n", | 1650 | "space 0x%lx\n", max_distance, |
| 1649 | max_distance, VMALLOC_END - VMALLOC_START); | 1651 | (unsigned long)(VMALLOC_END - VMALLOC_START)); |
| 1650 | #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK | 1652 | #ifdef CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK |
| 1651 | /* and fail if we have fallback */ | 1653 | /* and fail if we have fallback */ |
| 1652 | rc = -EINVAL; | 1654 | rc = -EINVAL; |
| @@ -719,7 +719,7 @@ int page_referenced(struct page *page, | |||
| 719 | unlock_page(page); | 719 | unlock_page(page); |
| 720 | } | 720 | } |
| 721 | out: | 721 | out: |
| 722 | if (page_test_and_clear_young(page)) | 722 | if (page_test_and_clear_young(page_to_pfn(page))) |
| 723 | referenced++; | 723 | referenced++; |
| 724 | 724 | ||
| 725 | return referenced; | 725 | return referenced; |
| @@ -785,10 +785,8 @@ int page_mkclean(struct page *page) | |||
| 785 | struct address_space *mapping = page_mapping(page); | 785 | struct address_space *mapping = page_mapping(page); |
| 786 | if (mapping) { | 786 | if (mapping) { |
| 787 | ret = page_mkclean_file(mapping, page); | 787 | ret = page_mkclean_file(mapping, page); |
| 788 | if (page_test_dirty(page)) { | 788 | if (page_test_and_clear_dirty(page_to_pfn(page), 1)) |
| 789 | page_clear_dirty(page, 1); | ||
| 790 | ret = 1; | 789 | ret = 1; |
| 791 | } | ||
| 792 | } | 790 | } |
| 793 | } | 791 | } |
| 794 | 792 | ||
| @@ -981,10 +979,9 @@ void page_remove_rmap(struct page *page) | |||
| 981 | * not if it's in swapcache - there might be another pte slot | 979 | * not if it's in swapcache - there might be another pte slot |
| 982 | * containing the swap entry, but page not yet written to swap. | 980 | * containing the swap entry, but page not yet written to swap. |
| 983 | */ | 981 | */ |
| 984 | if ((!PageAnon(page) || PageSwapCache(page)) && page_test_dirty(page)) { | 982 | if ((!PageAnon(page) || PageSwapCache(page)) && |
| 985 | page_clear_dirty(page, 1); | 983 | page_test_and_clear_dirty(page_to_pfn(page), 1)) |
| 986 | set_page_dirty(page); | 984 | set_page_dirty(page); |
| 987 | } | ||
| 988 | /* | 985 | /* |
| 989 | * Hugepages are not counted in NR_ANON_PAGES nor NR_FILE_MAPPED | 986 | * Hugepages are not counted in NR_ANON_PAGES nor NR_FILE_MAPPED |
| 990 | * and not charged by memcg for now. | 987 | * and not charged by memcg for now. |
