diff options
author | Nadia Derbey <Nadia.Derbey@bull.net> | 2008-04-29 04:00:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:13 -0400 |
commit | 6546bc4279241e8fa432de1bb63a4f6f791fd669 (patch) | |
tree | 308f5c1621b1019a44800622ffc468a372f09434 /include | |
parent | 91cfb2b4b57816de0c96de417b3238249f0b125f (diff) |
ipc: re-enable msgmni automatic recomputing msgmni if set to negative
The enhancement as asked for by Yasunori: if msgmni is set to a negative
value, register it back into the ipcns notifier chain.
A new interface has been added to the notification mechanism:
notifier_chain_cond_register() registers a notifier block only if not already
registered. With that new interface we avoid taking care of the states
changes in procfs.
Signed-off-by: Nadia Derbey <Nadia.Derbey@bull.net>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Mingming Cao <cmm@us.ibm.com>
Cc: Pierre Peiffer <pierre.peiffer@bull.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ipc_namespace.h | 1 | ||||
-rw-r--r-- | include/linux/notifier.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index c3b1da9e5feb..ea6c18a8b0d4 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
@@ -52,6 +52,7 @@ extern atomic_t nr_ipc_ns; | |||
52 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | 52 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, |
53 | 53 | ||
54 | extern int register_ipcns_notifier(struct ipc_namespace *); | 54 | extern int register_ipcns_notifier(struct ipc_namespace *); |
55 | extern int cond_register_ipcns_notifier(struct ipc_namespace *); | ||
55 | extern int unregister_ipcns_notifier(struct ipc_namespace *); | 56 | extern int unregister_ipcns_notifier(struct ipc_namespace *); |
56 | extern int ipcns_notify(unsigned long); | 57 | extern int ipcns_notify(unsigned long); |
57 | 58 | ||
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 20dfed590183..0ff6224d172a 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -121,6 +121,10 @@ extern int raw_notifier_chain_register(struct raw_notifier_head *nh, | |||
121 | extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh, | 121 | extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh, |
122 | struct notifier_block *nb); | 122 | struct notifier_block *nb); |
123 | 123 | ||
124 | extern int blocking_notifier_chain_cond_register( | ||
125 | struct blocking_notifier_head *nh, | ||
126 | struct notifier_block *nb); | ||
127 | |||
124 | extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, | 128 | extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, |
125 | struct notifier_block *nb); | 129 | struct notifier_block *nb); |
126 | extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, | 130 | extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, |