Commit feb32a85 authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds

[PATCH] mmap MAP_NORESERVE not in vm_flags

do_mmap_pgoff clears MAP_NORESERVE from vm_flags when VM accounts
strictly: but it's not in vm_flags, it's in flags (and tested there).
parent 4b07a3c5
......@@ -535,7 +535,7 @@ unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
return -ENOMEM;
if (sysctl_overcommit_memory > 1)
vm_flags &= ~MAP_NORESERVE;
flags &= ~MAP_NORESERVE;
/* Private writable mapping? Check memory availability.. */
if ((((vm_flags & (VM_SHARED | VM_WRITE)) == VM_WRITE) ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment