diff options
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/inode.c | 10 | ||||
-rw-r--r-- | fs/proc/task_mmu.c | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 9f8ef9b7674d..8eaa1ba793fc 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -288,10 +288,14 @@ static int proc_reg_mmap(struct file *file, struct vm_area_struct *vma) | |||
288 | static unsigned long proc_reg_get_unmapped_area(struct file *file, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags) | 288 | static unsigned long proc_reg_get_unmapped_area(struct file *file, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags) |
289 | { | 289 | { |
290 | struct proc_dir_entry *pde = PDE(file_inode(file)); | 290 | struct proc_dir_entry *pde = PDE(file_inode(file)); |
291 | int rv = -EIO; | 291 | unsigned long rv = -EIO; |
292 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 292 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long) = NULL; |
293 | if (use_pde(pde)) { | 293 | if (use_pde(pde)) { |
294 | get_unmapped_area = pde->proc_fops->get_unmapped_area; | 294 | #ifdef CONFIG_MMU |
295 | get_unmapped_area = current->mm->get_unmapped_area; | ||
296 | #endif | ||
297 | if (pde->proc_fops->get_unmapped_area) | ||
298 | get_unmapped_area = pde->proc_fops->get_unmapped_area; | ||
295 | if (get_unmapped_area) | 299 | if (get_unmapped_area) |
296 | rv = get_unmapped_area(file, orig_addr, len, pgoff, flags); | 300 | rv = get_unmapped_area(file, orig_addr, len, pgoff, flags); |
297 | unuse_pde(pde); | 301 | unuse_pde(pde); |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 7366e9d63cee..390bdab01c3c 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -941,6 +941,8 @@ static void pte_to_pagemap_entry(pagemap_entry_t *pme, struct pagemapread *pm, | |||
941 | frame = pte_pfn(pte); | 941 | frame = pte_pfn(pte); |
942 | flags = PM_PRESENT; | 942 | flags = PM_PRESENT; |
943 | page = vm_normal_page(vma, addr, pte); | 943 | page = vm_normal_page(vma, addr, pte); |
944 | if (pte_soft_dirty(pte)) | ||
945 | flags2 |= __PM_SOFT_DIRTY; | ||
944 | } else if (is_swap_pte(pte)) { | 946 | } else if (is_swap_pte(pte)) { |
945 | swp_entry_t entry; | 947 | swp_entry_t entry; |
946 | if (pte_swp_soft_dirty(pte)) | 948 | if (pte_swp_soft_dirty(pte)) |
@@ -960,7 +962,7 @@ static void pte_to_pagemap_entry(pagemap_entry_t *pme, struct pagemapread *pm, | |||
960 | 962 | ||
961 | if (page && !PageAnon(page)) | 963 | if (page && !PageAnon(page)) |
962 | flags |= PM_FILE; | 964 | flags |= PM_FILE; |
963 | if ((vma->vm_flags & VM_SOFTDIRTY) || pte_soft_dirty(pte)) | 965 | if ((vma->vm_flags & VM_SOFTDIRTY)) |
964 | flags2 |= __PM_SOFT_DIRTY; | 966 | flags2 |= __PM_SOFT_DIRTY; |
965 | 967 | ||
966 | *pme = make_pme(PM_PFRAME(frame) | PM_STATUS2(pm->v2, flags2) | flags); | 968 | *pme = make_pme(PM_PFRAME(frame) | PM_STATUS2(pm->v2, flags2) | flags); |