diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:51:47 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-07 22:51:47 -0500 |
commit | 6b995751c2e851d2bc9c277b5884d0adb519e31d (patch) | |
tree | 7a15b41b5d8ce612915584a0773c670d5c0ab5b8 /ipc | |
parent | 6c2f4267833f453156f8f439cc32eb4c92f357b4 (diff) | |
parent | d27ba47e7e8c466c18983a1779d611f82d6a354f (diff) |
Merge branch 'master'
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/mqueue.c | 2 | ||||
-rw-r--r-- | ipc/shm.c | 10 | ||||
-rw-r--r-- | ipc/util.c | 9 |
3 files changed, 15 insertions, 6 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index a0f18c9cc89d..c8943b53d8e6 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * POSIX message queues filesystem for Linux. | 2 | * POSIX message queues filesystem for Linux. |
3 | * | 3 | * |
4 | * Copyright (C) 2003,2004 Krzysztof Benedyczak (golbi@mat.uni.torun.pl) | 4 | * Copyright (C) 2003,2004 Krzysztof Benedyczak (golbi@mat.uni.torun.pl) |
5 | * Michal Wronski (wrona@mat.uni.torun.pl) | 5 | * Michal Wronski (Michal.Wronski@motorola.com) |
6 | * | 6 | * |
7 | * Spinlocks: Mohamed Abbas (abbas.mohamed@intel.com) | 7 | * Spinlocks: Mohamed Abbas (abbas.mohamed@intel.com) |
8 | * Lockless receive & send, fd based notify: | 8 | * Lockless receive & send, fd based notify: |
@@ -212,8 +212,16 @@ static int newseg (key_t key, int shmflg, size_t size) | |||
212 | file = hugetlb_zero_setup(size); | 212 | file = hugetlb_zero_setup(size); |
213 | shp->mlock_user = current->user; | 213 | shp->mlock_user = current->user; |
214 | } else { | 214 | } else { |
215 | int acctflag = VM_ACCOUNT; | ||
216 | /* | ||
217 | * Do not allow no accounting for OVERCOMMIT_NEVER, even | ||
218 | * if it's asked for. | ||
219 | */ | ||
220 | if ((shmflg & SHM_NORESERVE) && | ||
221 | sysctl_overcommit_memory != OVERCOMMIT_NEVER) | ||
222 | acctflag = 0; | ||
215 | sprintf (name, "SYSV%08x", key); | 223 | sprintf (name, "SYSV%08x", key); |
216 | file = shmem_file_setup(name, size, VM_ACCOUNT); | 224 | file = shmem_file_setup(name, size, acctflag); |
217 | } | 225 | } |
218 | error = PTR_ERR(file); | 226 | error = PTR_ERR(file); |
219 | if (IS_ERR(file)) | 227 | if (IS_ERR(file)) |
diff --git a/ipc/util.c b/ipc/util.c index 10e836d0d89e..23f1cec150c1 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -410,7 +410,8 @@ void ipc_rcu_getref(void *ptr) | |||
410 | } | 410 | } |
411 | 411 | ||
412 | /** | 412 | /** |
413 | * ipc_schedule_free - free ipc + rcu space | 413 | * ipc_schedule_free - free ipc + rcu space |
414 | * @head: RCU callback structure for queued work | ||
414 | * | 415 | * |
415 | * Since RCU callback function is called in bh, | 416 | * Since RCU callback function is called in bh, |
416 | * we need to defer the vfree to schedule_work | 417 | * we need to defer the vfree to schedule_work |
@@ -427,10 +428,10 @@ static void ipc_schedule_free(struct rcu_head *head) | |||
427 | } | 428 | } |
428 | 429 | ||
429 | /** | 430 | /** |
430 | * ipc_immediate_free - free ipc + rcu space | 431 | * ipc_immediate_free - free ipc + rcu space |
431 | * | 432 | * @head: RCU callback structure that contains pointer to be freed |
432 | * Free from the RCU callback context | ||
433 | * | 433 | * |
434 | * Free from the RCU callback context | ||
434 | */ | 435 | */ |
435 | static void ipc_immediate_free(struct rcu_head *head) | 436 | static void ipc_immediate_free(struct rcu_head *head) |
436 | { | 437 | { |