ipc: re-enable msgmni automatic recomputing msgmni if set to negative
authorNadia Derbey <Nadia.Derbey@bull.net>
Tue, 29 Apr 2008 08:00:45 +0000 (01:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:06:13 +0000 (08:06 -0700)
commit6546bc4279241e8fa432de1bb63a4f6f791fd669
tree308f5c1621b1019a44800622ffc468a372f09434
parent91cfb2b4b57816de0c96de417b3238249f0b125f
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>
include/linux/ipc_namespace.h
include/linux/notifier.h
ipc/ipc_sysctl.c
ipc/ipcns_notifier.c
kernel/notifier.c