aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ipc.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-07-23 05:20:10 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-07-23 05:20:10 -0400
commit39fe5434cb9de5da40510028b17b96bc4eb312b3 (patch)
tree7a02a317b9ad57da51ca99887c119e779ccf3f13 /include/linux/ipc.h
parent0fc72b81d3111d114ab378935b1cf07680ca1289 (diff)
parentf695baf2df9e0413d3521661070103711545207a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/ipc.h')
-rw-r--r--include/linux/ipc.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/linux/ipc.h b/include/linux/ipc.h
index 1980867a64a4..3fd3ddd5f0d9 100644
--- a/include/linux/ipc.h
+++ b/include/linux/ipc.h
@@ -52,6 +52,7 @@ struct ipc_perm
52#ifdef __KERNEL__ 52#ifdef __KERNEL__
53 53
54#include <linux/kref.h> 54#include <linux/kref.h>
55#include <linux/spinlock.h>
55 56
56#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */ 57#define IPCMNI 32768 /* <= MAX_INT limit for ipc arrays (including sysctl changes) */
57 58
@@ -92,6 +93,7 @@ extern struct ipc_namespace init_ipc_ns;
92 93
93#ifdef CONFIG_SYSVIPC 94#ifdef CONFIG_SYSVIPC
94#define INIT_IPC_NS(ns) .ns = &init_ipc_ns, 95#define INIT_IPC_NS(ns) .ns = &init_ipc_ns,
96extern void free_ipc_ns(struct kref *kref);
95extern struct ipc_namespace *copy_ipcs(unsigned long flags, 97extern struct ipc_namespace *copy_ipcs(unsigned long flags,
96 struct ipc_namespace *ns); 98 struct ipc_namespace *ns);
97#else 99#else
@@ -103,13 +105,9 @@ static inline struct ipc_namespace *copy_ipcs(unsigned long flags,
103} 105}
104#endif 106#endif
105 107
106#ifdef CONFIG_IPC_NS
107extern void free_ipc_ns(struct kref *kref);
108#endif
109
110static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) 108static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
111{ 109{
112#ifdef CONFIG_IPC_NS 110#ifdef CONFIG_SYSVIPC
113 if (ns) 111 if (ns)
114 kref_get(&ns->kref); 112 kref_get(&ns->kref);
115#endif 113#endif
@@ -118,7 +116,7 @@ static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
118 116
119static inline void put_ipc_ns(struct ipc_namespace *ns) 117static inline void put_ipc_ns(struct ipc_namespace *ns)
120{ 118{
121#ifdef CONFIG_IPC_NS 119#ifdef CONFIG_SYSVIPC
122 kref_put(&ns->kref, free_ipc_ns); 120 kref_put(&ns->kref, free_ipc_ns);
123#endif 121#endif
124} 122}
@@ -126,5 +124,3 @@ static inline void put_ipc_ns(struct ipc_namespace *ns)
126#endif /* __KERNEL__ */ 124#endif /* __KERNEL__ */
127 125
128#endif /* _LINUX_IPC_H */ 126#endif /* _LINUX_IPC_H */
129
130