]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - ipc/shm.c
Stop playing silly games with the VM_ACCOUNT flag
[linux-2.6-omap-h63xx.git] / ipc / shm.c
index a9e09ad2263e36e611c8e7599e34115cfb467b92..c0a021f7f41a8ff80118a5b0f76516444a561bd2 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -368,14 +368,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
                file = hugetlb_file_setup(name, size);
                shp->mlock_user = current_user();
        } else {
-               int acctflag = VM_ACCOUNT;
+               int acctflag = 0;
                /*
                 * Do not allow no accounting for OVERCOMMIT_NEVER, even
                 * if it's asked for.
                 */
                if  ((shmflg & SHM_NORESERVE) &&
                                sysctl_overcommit_memory != OVERCOMMIT_NEVER)
-                       acctflag = 0;
+                       acctflag = VM_NORESERVE;
                file = shmem_file_setup(name, size, acctflag);
        }
        error = PTR_ERR(file);