diff options
author | Mark Brown <broonie@linaro.org> | 2013-11-05 20:06:22 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-05 20:06:22 +0000 |
commit | 7c9373fbcd0b29f6ccc28407c11ecd51cfa7a3c2 (patch) | |
tree | f7108509cb562de12c24b91563f26bac9ca3ea96 /mm | |
parent | 9c9a23470dc44b51230c35b93d1930e2dc2d1000 (diff) | |
parent | 4e77f7f1261f65cff06918bc5e66d02a418fc842 (diff) |
Merge tag 'v3.10.18' into linux-linaro-lsk
This is the 3.10.18 stable release
Diffstat (limited to 'mm')
-rw-r--r-- | mm/huge_memory.c | 10 | ||||
-rw-r--r-- | mm/page-writeback.c | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index b92d0ce428b..0164b09c1e9 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2699,6 +2699,7 @@ void __split_huge_page_pmd(struct vm_area_struct *vma, unsigned long address, mmun_start = haddr; mmun_end = haddr + HPAGE_PMD_SIZE; +again: mmu_notifier_invalidate_range_start(mm, mmun_start, mmun_end); spin_lock(&mm->page_table_lock); if (unlikely(!pmd_trans_huge(*pmd))) { @@ -2721,7 +2722,14 @@ void __split_huge_page_pmd(struct vm_area_struct *vma, unsigned long address, split_huge_page(page); put_page(page); - BUG_ON(pmd_trans_huge(*pmd)); + + /* + * We don't always have down_write of mmap_sem here: a racing + * do_huge_pmd_wp_page() might have copied-on-write to another + * huge page before our split_huge_page() got the anon_vma lock. + */ + if (unlikely(pmd_trans_huge(*pmd))) + goto again; } void split_huge_page_pmd_mm(struct mm_struct *mm, unsigned long address, diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 4514ad7415c..aca4364275b 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1104,11 +1104,11 @@ static unsigned long dirty_poll_interval(unsigned long dirty, return 1; } -static long bdi_max_pause(struct backing_dev_info *bdi, - unsigned long bdi_dirty) +static unsigned long bdi_max_pause(struct backing_dev_info *bdi, + unsigned long bdi_dirty) { - long bw = bdi->avg_write_bandwidth; - long t; + unsigned long bw = bdi->avg_write_bandwidth; + unsigned long t; /* * Limit pause time for small memory systems. If sleeping for too long @@ -1120,7 +1120,7 @@ static long bdi_max_pause(struct backing_dev_info *bdi, t = bdi_dirty / (1 + bw / roundup_pow_of_two(1 + HZ / 8)); t++; - return min_t(long, t, MAX_PAUSE); + return min_t(unsigned long, t, MAX_PAUSE); } static long bdi_min_pause(struct backing_dev_info *bdi, |