diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 1 | ||||
-rw-r--r-- | mm/mempolicy.c | 4 | ||||
-rw-r--r-- | mm/mlock.c | 1 | ||||
-rw-r--r-- | mm/mmap.c | 1 | ||||
-rw-r--r-- | mm/mremap.c | 1 | ||||
-rw-r--r-- | mm/page_alloc.c | 11 | ||||
-rw-r--r-- | mm/swapfile.c | 1 | ||||
-rw-r--r-- | mm/tiny-shmem.c | 2 |
8 files changed, 15 insertions, 7 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 96de772be487..a965b6b35f26 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/aio.h> | 17 | #include <linux/aio.h> |
18 | #include <linux/capability.h> | ||
18 | #include <linux/kernel_stat.h> | 19 | #include <linux/kernel_stat.h> |
19 | #include <linux/mm.h> | 20 | #include <linux/mm.h> |
20 | #include <linux/swap.h> | 21 | #include <linux/swap.h> |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 1850d0aef4ac..b62cab575a84 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -208,6 +208,8 @@ static int check_pte_range(struct vm_area_struct *vma, pmd_t *pmd, | |||
208 | page = vm_normal_page(vma, addr, *pte); | 208 | page = vm_normal_page(vma, addr, *pte); |
209 | if (!page) | 209 | if (!page) |
210 | continue; | 210 | continue; |
211 | if (PageReserved(page)) | ||
212 | continue; | ||
211 | nid = page_to_nid(page); | 213 | nid = page_to_nid(page); |
212 | if (node_isset(nid, *nodes) == !!(flags & MPOL_MF_INVERT)) | 214 | if (node_isset(nid, *nodes) == !!(flags & MPOL_MF_INVERT)) |
213 | continue; | 215 | continue; |
@@ -290,7 +292,7 @@ static inline int check_pgd_range(struct vm_area_struct *vma, | |||
290 | static inline int vma_migratable(struct vm_area_struct *vma) | 292 | static inline int vma_migratable(struct vm_area_struct *vma) |
291 | { | 293 | { |
292 | if (vma->vm_flags & ( | 294 | if (vma->vm_flags & ( |
293 | VM_LOCKED|VM_IO|VM_HUGETLB|VM_PFNMAP)) | 295 | VM_LOCKED|VM_IO|VM_HUGETLB|VM_PFNMAP|VM_RESERVED)) |
294 | return 0; | 296 | return 0; |
295 | return 1; | 297 | return 1; |
296 | } | 298 | } |
diff --git a/mm/mlock.c b/mm/mlock.c index 4ae3a46ff768..b90c59573abf 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -5,6 +5,7 @@ | |||
5 | * (C) Copyright 2002 Christoph Hellwig | 5 | * (C) Copyright 2002 Christoph Hellwig |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/capability.h> | ||
8 | #include <linux/mman.h> | 9 | #include <linux/mman.h> |
9 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
10 | #include <linux/mempolicy.h> | 11 | #include <linux/mempolicy.h> |
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/pagemap.h> | 13 | #include <linux/pagemap.h> |
14 | #include <linux/swap.h> | 14 | #include <linux/swap.h> |
15 | #include <linux/syscalls.h> | 15 | #include <linux/syscalls.h> |
16 | #include <linux/capability.h> | ||
16 | #include <linux/init.h> | 17 | #include <linux/init.h> |
17 | #include <linux/file.h> | 18 | #include <linux/file.h> |
18 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
diff --git a/mm/mremap.c b/mm/mremap.c index ddaeee9a0b69..1903bdf65e42 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/shm.h> | 13 | #include <linux/shm.h> |
14 | #include <linux/mman.h> | 14 | #include <linux/mman.h> |
15 | #include <linux/swap.h> | 15 | #include <linux/swap.h> |
16 | #include <linux/capability.h> | ||
16 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
17 | #include <linux/highmem.h> | 18 | #include <linux/highmem.h> |
18 | #include <linux/security.h> | 19 | #include <linux/security.h> |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8e363536e2da..8c960b469593 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -137,9 +137,9 @@ static inline int bad_range(struct zone *zone, struct page *page) | |||
137 | static void bad_page(struct page *page) | 137 | static void bad_page(struct page *page) |
138 | { | 138 | { |
139 | printk(KERN_EMERG "Bad page state in process '%s'\n" | 139 | printk(KERN_EMERG "Bad page state in process '%s'\n" |
140 | "page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d\n" | 140 | KERN_EMERG "page:%p flags:0x%0*lx mapping:%p mapcount:%d count:%d\n" |
141 | "Trying to fix it up, but a reboot is needed\n" | 141 | KERN_EMERG "Trying to fix it up, but a reboot is needed\n" |
142 | "Backtrace:\n", | 142 | KERN_EMERG "Backtrace:\n", |
143 | current->comm, page, (int)(2*sizeof(unsigned long)), | 143 | current->comm, page, (int)(2*sizeof(unsigned long)), |
144 | (unsigned long)page->flags, page->mapping, | 144 | (unsigned long)page->flags, page->mapping, |
145 | page_mapcount(page), page_count(page)); | 145 | page_mapcount(page), page_count(page)); |
@@ -931,7 +931,8 @@ restart: | |||
931 | * | 931 | * |
932 | * The caller may dip into page reserves a bit more if the caller | 932 | * The caller may dip into page reserves a bit more if the caller |
933 | * cannot run direct reclaim, or if the caller has realtime scheduling | 933 | * cannot run direct reclaim, or if the caller has realtime scheduling |
934 | * policy. | 934 | * policy or is asking for __GFP_HIGH memory. GFP_ATOMIC requests will |
935 | * set both ALLOC_HARDER (!wait) and ALLOC_HIGH (__GFP_HIGH). | ||
935 | */ | 936 | */ |
936 | alloc_flags = ALLOC_WMARK_MIN; | 937 | alloc_flags = ALLOC_WMARK_MIN; |
937 | if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait) | 938 | if ((unlikely(rt_task(p)) && !in_interrupt()) || !wait) |
@@ -1741,7 +1742,7 @@ void __devinit memmap_init_zone(unsigned long size, int nid, unsigned long zone, | |||
1741 | unsigned long end_pfn = start_pfn + size; | 1742 | unsigned long end_pfn = start_pfn + size; |
1742 | unsigned long pfn; | 1743 | unsigned long pfn; |
1743 | 1744 | ||
1744 | for (pfn = start_pfn; pfn < end_pfn; pfn++, page++) { | 1745 | for (pfn = start_pfn; pfn < end_pfn; pfn++) { |
1745 | if (!early_pfn_valid(pfn)) | 1746 | if (!early_pfn_valid(pfn)) |
1746 | continue; | 1747 | continue; |
1747 | page = pfn_to_page(pfn); | 1748 | page = pfn_to_page(pfn); |
diff --git a/mm/swapfile.c b/mm/swapfile.c index d8a5afc8b2a3..957fef43fa60 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/rmap.h> | 25 | #include <linux/rmap.h> |
26 | #include <linux/security.h> | 26 | #include <linux/security.h> |
27 | #include <linux/backing-dev.h> | 27 | #include <linux/backing-dev.h> |
28 | #include <linux/capability.h> | ||
28 | #include <linux/syscalls.h> | 29 | #include <linux/syscalls.h> |
29 | 30 | ||
30 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
diff --git a/mm/tiny-shmem.c b/mm/tiny-shmem.c index cdc6d431972b..f9d6a9cc91c4 100644 --- a/mm/tiny-shmem.c +++ b/mm/tiny-shmem.c | |||
@@ -90,7 +90,7 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) | |||
90 | file->f_mode = FMODE_WRITE | FMODE_READ; | 90 | file->f_mode = FMODE_WRITE | FMODE_READ; |
91 | 91 | ||
92 | /* notify everyone as to the change of file size */ | 92 | /* notify everyone as to the change of file size */ |
93 | error = do_truncate(dentry, size, file); | 93 | error = do_truncate(dentry, size, 0, file); |
94 | if (error < 0) | 94 | if (error < 0) |
95 | goto close_file; | 95 | goto close_file; |
96 | 96 | ||