diff options
author | Philippe Langlais <philippe.langlais@linaro.org> | 2012-03-19 16:30:14 +0100 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@linaro.org> | 2012-03-19 16:30:14 +0100 |
commit | f99602d0c458d0adc9841d8511e0787d8026d039 (patch) | |
tree | 88ba5886f05c2c6211f7c499c320b7c15b86a8da /mm | |
parent | cdeead710f0623fba23350a94fe4ab6b168ce520 (diff) | |
parent | 88bef40b1205317592bb0c6c60ebf084422485c3 (diff) |
Merge remote-tracking branch 'jstultz/linaro-android-3.3' into integration-android-ux500
Conflicts:
arch/arm/common/Makefile
drivers/gpu/Makefile
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/mmc/card/block.c
drivers/mmc/core/core.c
drivers/video/Kconfig
include/net/bluetooth/hci.h
include/net/bluetooth/hci_core.h
include/net/bluetooth/sco.h
kernel/printk.c
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c
net/bluetooth/l2cap_core.c
net/bluetooth/mgmt.c
net/bluetooth/sco.c
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 3 | ||||
-rw-r--r-- | mm/shmem.c | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a13ded1938f..3449c1bbe60 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -192,6 +192,7 @@ static char * const zone_names[MAX_NR_ZONES] = { }; int min_free_kbytes = 1024; +int min_free_order_shift = 1; static unsigned long __meminitdata nr_kernel_pages; static unsigned long __meminitdata nr_all_pages; @@ -1529,7 +1530,7 @@ static bool __zone_watermark_ok(struct zone *z, int order, unsigned long mark, free_pages -= z->free_area[o].nr_free << o; /* Require fewer higher order pages to be free */ - min >>= 1; + min >>= min_free_order_shift; if (free_pages <= min) return false; diff --git a/mm/shmem.c b/mm/shmem.c index 269d049294a..8ac8fdbd68a 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2554,6 +2554,15 @@ put_memory: } EXPORT_SYMBOL_GPL(shmem_file_setup); +void shmem_set_file(struct vm_area_struct *vma, struct file *file) +{ + if (vma->vm_file) + fput(vma->vm_file); + vma->vm_file = file; + vma->vm_ops = &shmem_vm_ops; + vma->vm_flags |= VM_CAN_NONLINEAR; +} + /** * shmem_zero_setup - setup a shared anonymous mapping * @vma: the vma to be mmapped is prepared by do_mmap_pgoff @@ -2567,11 +2576,7 @@ int shmem_zero_setup(struct vm_area_struct *vma) if (IS_ERR(file)) return PTR_ERR(file); - if (vma->vm_file) - fput(vma->vm_file); - vma->vm_file = file; - vma->vm_ops = &shmem_vm_ops; - vma->vm_flags |= VM_CAN_NONLINEAR; + shmem_set_file(vma, file); return 0; } |