This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / mm / slab_vs.h
1
2 #include <linux/vserver/context.h>
3
4 #include <linux/vs_context.h>
5
6 static inline
7 void vx_slab_alloc(struct kmem_cache *cachep, gfp_t flags)
8 {
9         int what = gfp_zone(cachep->gfpflags);
10
11         if (!current->vx_info)
12                 return;
13
14         atomic_add(cachep->buffer_size, &current->vx_info->cacct.slab[what]);
15 }
16
17 static inline
18 void vx_slab_free(struct kmem_cache *cachep)
19 {
20         int what = gfp_zone(cachep->gfpflags);
21
22         if (!current->vx_info)
23                 return;
24
25         atomic_sub(cachep->buffer_size, &current->vx_info->cacct.slab[what]);
26 }
27