diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-26 10:45:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-26 10:45:22 -0400 |
commit | a5ebc0b1a7843508b375f7ab8a36a628e5c9f372 (patch) | |
tree | 04d3ab410e08b4d9174c663dd6bf95611dd16d0a /ipc | |
parent | 5ba1ae92b6796b3367152ccd9baa022dde7eed4c (diff) | |
parent | 8e0ee43bc2c3e19db56a4adaa9a9b04ce885cd84 (diff) |
Merge commit 'v2.6.29' into timers/core
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/shm.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -340,6 +340,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | |||
340 | struct file * file; | 340 | struct file * file; |
341 | char name[13]; | 341 | char name[13]; |
342 | int id; | 342 | int id; |
343 | int acctflag = 0; | ||
343 | 344 | ||
344 | if (size < SHMMIN || size > ns->shm_ctlmax) | 345 | if (size < SHMMIN || size > ns->shm_ctlmax) |
345 | return -EINVAL; | 346 | return -EINVAL; |
@@ -364,11 +365,12 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | |||
364 | 365 | ||
365 | sprintf (name, "SYSV%08x", key); | 366 | sprintf (name, "SYSV%08x", key); |
366 | if (shmflg & SHM_HUGETLB) { | 367 | if (shmflg & SHM_HUGETLB) { |
367 | /* hugetlb_file_setup takes care of mlock user accounting */ | 368 | /* hugetlb_file_setup applies strict accounting */ |
368 | file = hugetlb_file_setup(name, size); | 369 | if (shmflg & SHM_NORESERVE) |
370 | acctflag = VM_NORESERVE; | ||
371 | file = hugetlb_file_setup(name, size, acctflag); | ||
369 | shp->mlock_user = current_user(); | 372 | shp->mlock_user = current_user(); |
370 | } else { | 373 | } else { |
371 | int acctflag = 0; | ||
372 | /* | 374 | /* |
373 | * Do not allow no accounting for OVERCOMMIT_NEVER, even | 375 | * Do not allow no accounting for OVERCOMMIT_NEVER, even |
374 | * if it's asked for. | 376 | * if it's asked for. |