diff options
| author | Linus Torvalds <[email protected]> | 2014-02-25 15:38:13 -0800 | 
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2014-02-25 15:38:13 -0800 | 
| commit | d2a0476307e67a6e6a293563a4f4ad4ec79ac0e5 (patch) | |
| tree | 45abc67e451fae6c0c4403014bb1cda4d2a1fe3a /mm/memory.c | |
| parent | 6dba6ecba7d937e9b04b46f6cdff25e574f64857 (diff) | |
| parent | 61bd0943bc410c9f0daf0965535cb92ce76e1e8a (diff) | |
Merge branch 'akpm' (patches from Andrew Morton)
Merge misc fixes from Andrew Morton.
* emailed patches from Andrew Morton [email protected]>:
  MAINTAINERS: change mailing list address for Altera UART drivers
  Makefile: fix build with make 3.80 again
  MAINTAINERS: update L: misuses
  Makefile: fix extra parenthesis typo when CC_STACKPROTECTOR_REGULAR is enabled
  ipc,mqueue: remove limits for the amount of system-wide queues
  memcg: change oom_info_lock to mutex
  mm, thp: fix infinite loop on memcg OOM
  drivers/fmc/fmc-write-eeprom.c: fix decimal permissions
  drivers/iommu/omap-iommu-debug.c: fix decimal permissions
  mm, hwpoison: release page on PageHWPoison() in __do_fault()
Diffstat (limited to 'mm/memory.c')
| -rw-r--r-- | mm/memory.c | 15 | 
1 files changed, 4 insertions, 11 deletions
| diff --git a/mm/memory.c b/mm/memory.c index be6a0c0d4ae0..22dfa617bddb 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3348,6 +3348,7 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,  		if (ret & VM_FAULT_LOCKED)  			unlock_page(vmf.page);  		ret = VM_FAULT_HWPOISON; +		page_cache_release(vmf.page);  		goto uncharge_out;  	} @@ -3703,7 +3704,6 @@ static int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,  	if (unlikely(is_vm_hugetlb_page(vma)))  		return hugetlb_fault(mm, vma, address, flags); -retry:  	pgd = pgd_offset(mm, address);  	pud = pud_alloc(mm, pgd, address);  	if (!pud) @@ -3741,20 +3741,13 @@ retry:  			if (dirty && !pmd_write(orig_pmd)) {  				ret = do_huge_pmd_wp_page(mm, vma, address, pmd,  							  orig_pmd); -				/* -				 * If COW results in an oom, the huge pmd will -				 * have been split, so retry the fault on the -				 * pte for a smaller charge. -				 */ -				if (unlikely(ret & VM_FAULT_OOM)) -					goto retry; -				return ret; +				if (!(ret & VM_FAULT_FALLBACK)) +					return ret;  			} else {  				huge_pmd_set_accessed(mm, vma, address, pmd,  						      orig_pmd, dirty); +				return 0;  			} - -			return 0;  		}  	} |