|
@@ -262,7 +262,7 @@ static inline struct kmem_cache *cache_from_obj(struct kmem_cache *s, void *x)
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-
|
|
|
+#ifndef CONFIG_SLOB
|
|
|
/*
|
|
|
* The slab lists for all objects.
|
|
|
*/
|
|
@@ -294,5 +294,20 @@ struct kmem_cache_node {
|
|
|
|
|
|
};
|
|
|
|
|
|
+static inline struct kmem_cache_node *get_node(struct kmem_cache *s, int node)
|
|
|
+{
|
|
|
+ return s->node[node];
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * Iterator over all nodes. The body will be executed for each node that has
|
|
|
+ * a kmem_cache_node structure allocated (which is true for all online nodes)
|
|
|
+ */
|
|
|
+#define for_each_kmem_cache_node(__s, __node, __n) \
|
|
|
+ for (__node = 0; __n = get_node(__s, __node), __node < nr_node_ids; __node++) \
|
|
|
+ if (__n)
|
|
|
+
|
|
|
+#endif
|
|
|
+
|
|
|
void *slab_next(struct seq_file *m, void *p, loff_t *pos);
|
|
|
void slab_stop(struct seq_file *m, void *p);
|