On Mon, Dec 28, 2015 at 03:10:02PM -0800, Andrew Morton wrote: > On Tue, 29 Dec 2015 00:10:15 +0300 Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote: ... > > This clashes with > mm-mmapc-remove-redundant-local-variables-for-may_expand_vm.patch, > below. I resolved it thusly: > > bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages) > { > if (mm->total_vm + npages > rlimit(RLIMIT_AS) >> PAGE_SHIFT) > return false; > > if ((flags & (VM_WRITE | VM_SHARED | (VM_STACK_FLAGS & > (VM_GROWSUP | VM_GROWSDOWN)))) == VM_WRITE) > return mm->data_vm + npages <= rlimit(RLIMIT_DATA); > > return true; > } Thanks, Andrew! -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>