diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-17 00:36:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-10-17 00:36:03 -0400 |
commit | 056cdce0d3a214158f3a4ea40887b22639f855a8 (patch) | |
tree | 8ced4ccf6c7bac7eef49710c3cdfb0745cc85102 /fs | |
parent | 0056019da4b7ee5ab51fb174fe0655278578516f (diff) | |
parent | 57a8f0cdb87da776bf0e4ce7554a9133854fa779 (diff) |
Merge branch 'akpm' (fixes from Andrew Morton)
Merge misc fixes from Andrew Morton.
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (21 commits)
mm: revert mremap pud_free anti-fix
mm: fix BUG in __split_huge_page_pmd
swap: fix set_blocksize race during swapon/swapoff
procfs: call default get_unmapped_area on MMU-present architectures
procfs: fix unintended truncation of returned mapped address
writeback: fix negative bdi max pause
percpu_refcount: export symbols
fs: buffer: move allocation failure loop into the allocator
mm: memcg: handle non-error OOM situations more gracefully
tools/testing/selftests: fix uninitialized variable
block/partitions/efi.c: treat size mismatch as a warning, not an error
mm: hugetlb: initialize PG_reserved for tail pages of gigantic compound pages
mm/zswap: bugfix: memory leak when re-swapon
mm: /proc/pid/pagemap: inspect _PAGE_SOFT_DIRTY only on present pages
mm: migration: do not lose soft dirty bit if page is in migration state
gcov: MAINTAINERS: Add an entry for gcov
mm/hugetlb.c: correct missing private flag clearing
mm/vmscan.c: don't forget to free shrinker->nr_deferred
ipc/sem.c: synchronize semop and semctl with IPC_RMID
ipc: update locking scheme comments
...
Diffstat (limited to 'fs')
-rw-r--r-- | fs/buffer.c | 14 | ||||
-rw-r--r-- | fs/proc/inode.c | 10 | ||||
-rw-r--r-- | fs/proc/task_mmu.c | 4 |
3 files changed, 22 insertions, 6 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 4d7433534f5c..6024877335ca 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -1005,9 +1005,19 @@ grow_dev_page(struct block_device *bdev, sector_t block, | |||
1005 | struct buffer_head *bh; | 1005 | struct buffer_head *bh; |
1006 | sector_t end_block; | 1006 | sector_t end_block; |
1007 | int ret = 0; /* Will call free_more_memory() */ | 1007 | int ret = 0; /* Will call free_more_memory() */ |
1008 | gfp_t gfp_mask; | ||
1008 | 1009 | ||
1009 | page = find_or_create_page(inode->i_mapping, index, | 1010 | gfp_mask = mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS; |
1010 | (mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS)|__GFP_MOVABLE); | 1011 | gfp_mask |= __GFP_MOVABLE; |
1012 | /* | ||
1013 | * XXX: __getblk_slow() can not really deal with failure and | ||
1014 | * will endlessly loop on improvised global reclaim. Prefer | ||
1015 | * looping in the allocator rather than here, at least that | ||
1016 | * code knows what it's doing. | ||
1017 | */ | ||
1018 | gfp_mask |= __GFP_NOFAIL; | ||
1019 | |||
1020 | page = find_or_create_page(inode->i_mapping, index, gfp_mask); | ||
1011 | if (!page) | 1021 | if (!page) |
1012 | return ret; | 1022 | return ret; |
1013 | 1023 | ||
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); |