rk: gcc-wrapper.py ignore memcontrol.c:5355
[firefly-linux-kernel-4.4.55.git] / include / linux / ipc_namespace.h
index d6ad91f260389facf099b61c1644dbc8efd6fc36..1eee6bcfcf76a43856088b6314c2a52c0b2f10e1 100644 (file)
@@ -6,22 +6,13 @@
 #include <linux/rwsem.h>
 #include <linux/notifier.h>
 #include <linux/nsproxy.h>
-
-/*
- * ipc namespace events
- */
-#define IPCNS_MEMCHANGED   0x00000001   /* Notify lowmem size changed */
-#define IPCNS_CREATED  0x00000002   /* Notify new ipc namespace created */
-#define IPCNS_REMOVED  0x00000003   /* Notify ipc namespace removed */
-
-#define IPCNS_CALLBACK_PRI 0
+#include <linux/ns_common.h>
 
 struct user_namespace;
 
 struct ipc_ids {
        int in_use;
        unsigned short seq;
-       unsigned short seq_max;
        struct rw_semaphore rwsem;
        struct idr ipcs_idr;
        int next_id;
@@ -39,7 +30,6 @@ struct ipc_namespace {
        unsigned int    msg_ctlmni;
        atomic_t        msg_bytes;
        atomic_t        msg_hdrs;
-       int             auto_msgmni;
 
        size_t          shm_ctlmax;
        size_t          shm_ctlall;
@@ -69,7 +59,7 @@ struct ipc_namespace {
        /* user_ns which owns the ipc ns */
        struct user_namespace *user_ns;
 
-       unsigned int    proc_inum;
+       struct ns_common ns;
 };
 
 extern struct ipc_namespace init_ipc_ns;
@@ -78,18 +68,8 @@ extern atomic_t nr_ipc_ns;
 extern spinlock_t mq_lock;
 
 #ifdef CONFIG_SYSVIPC
-extern int register_ipcns_notifier(struct ipc_namespace *);
-extern int cond_register_ipcns_notifier(struct ipc_namespace *);
-extern void unregister_ipcns_notifier(struct ipc_namespace *);
-extern int ipcns_notify(unsigned long);
 extern void shm_destroy_orphaned(struct ipc_namespace *ns);
 #else /* CONFIG_SYSVIPC */
-static inline int register_ipcns_notifier(struct ipc_namespace *ns)
-{ return 0; }
-static inline int cond_register_ipcns_notifier(struct ipc_namespace *ns)
-{ return 0; }
-static inline void unregister_ipcns_notifier(struct ipc_namespace *ns) { }
-static inline int ipcns_notify(unsigned long l) { return 0; }
 static inline void shm_destroy_orphaned(struct ipc_namespace *ns) {}
 #endif /* CONFIG_SYSVIPC */