[PATCH] vmacct4/9 mmap MAP_NORESERVE not in vm_flags

Hugh Dickins (hugh@veritas.com)
Mon, 29 Jul 2002 23:09:13 +0100 (BST)


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).

--- vmacct3/mm/mmap.c Mon Jul 29 11:48:04 2002
+++ vmacct4/mm/mmap.c Mon Jul 29 19:23:46 2002
@@ -535,7 +535,7 @@
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) ||

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/