namespaces: mqueue ns: move mqueue_mnt into struct ipc_namespace
[safe/jmp/linux-2.6] / ipc / msgutil.c
index c82c215..73c316c 100644 (file)
 #include <linux/security.h>
 #include <linux/slab.h>
 #include <linux/ipc.h>
+#include <linux/ipc_namespace.h>
 #include <asm/uaccess.h>
 
 #include "util.h"
 
+/*
+ * The next 2 defines are here bc this is the only file
+ * compiled when either CONFIG_SYSVIPC and CONFIG_POSIX_MQUEUE
+ * and not CONFIG_IPC_NS.
+ */
+struct ipc_namespace init_ipc_ns = {
+       .kref = {
+               /* It's not for this patch to change, but should this be 1? */
+               .refcount       = ATOMIC_INIT(2),
+       },
+#ifdef CONFIG_POSIX_MQUEUE
+       .mq_mnt          = NULL,
+       .mq_queues_count = 0,
+       .mq_queues_max   = DFLT_QUEUESMAX,
+       .mq_msg_max      = DFLT_MSGMAX,
+       .mq_msgsize_max  = DFLT_MSGSIZEMAX,
+#endif
+};
+
+atomic_t nr_ipc_ns = ATOMIC_INIT(1);
+
 struct msg_msgseg {
        struct msg_msgseg* next;
        /* the next part of the message follows immediately */