diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-05 06:47:02 +0000 |
commit | 99a7e12f34b3661a0d1354eef83a0eef4df5e34c (patch) | |
tree | 3560aca9ca86792f9ab7bd87861ea143a1b3c7a3 /mm/filemap.c | |
parent | e73a04659c0b8cdee4dd40e58630e2cf63afb316 (diff) |
Merge with Linux 2.3.38.
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 32e76e13e..35a4b6d37 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -211,7 +211,7 @@ repeat: spin_unlock(&pagecache_lock); } -int shrink_mmap(int priority, int gfp_mask) +int shrink_mmap(int priority, int gfp_mask, zone_t *zone) { int ret = 0, count; LIST_HEAD(young); @@ -239,9 +239,7 @@ int shrink_mmap(int priority, int gfp_mask) dispose = &old; /* don't account passes over not DMA pages */ - if ((gfp_mask & __GFP_DMA) && !PageDMA(page)) - goto dispose_continue; - if (!(gfp_mask & __GFP_HIGHMEM) && PageHighMem(page)) + if (zone && (!memclass(page->zone, zone))) goto dispose_continue; count--; @@ -1298,7 +1296,7 @@ out: * it in the page cache, and handles the special cases reasonably without * having a lot of duplicated code. */ -static struct page * filemap_nopage(struct vm_area_struct * area, +struct page * filemap_nopage(struct vm_area_struct * area, unsigned long address, int no_share) { int error; @@ -1595,7 +1593,7 @@ static inline int filemap_sync_pmd_range(pgd_t * pgd, return error; } -static int filemap_sync(struct vm_area_struct * vma, unsigned long address, +int filemap_sync(struct vm_area_struct * vma, unsigned long address, size_t size, unsigned int flags) { pgd_t * dir; @@ -1620,7 +1618,9 @@ static int filemap_sync(struct vm_area_struct * vma, unsigned long address, */ static void filemap_unmap(struct vm_area_struct *vma, unsigned long start, size_t len) { + lock_kernel(); filemap_sync(vma, start, len, MS_ASYNC); + unlock_kernel(); } /* |