summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index a9e09ad2263e..c0a021f7f41a 100644
--- 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);