Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / kernel / vserver / limit_init.h
1
2
3 static inline void vx_info_init_limit(struct _vx_limit *limit)
4 {
5         int lim;
6
7         for (lim=0; lim<NUM_LIMITS; lim++) {
8                 limit->rlim[lim] = RLIM_INFINITY;
9                 limit->rmax[lim] = 0;
10                 atomic_set(&limit->rcur[lim], 0);
11                 atomic_set(&limit->lhit[lim], 0);
12         }
13 }
14
15 static inline void vx_info_exit_limit(struct _vx_limit *limit)
16 {
17 #ifdef  CONFIG_VSERVER_DEBUG
18         unsigned long value;
19         unsigned int lim;
20
21         for (lim=0; lim<NUM_LIMITS; lim++) {
22                 value = atomic_read(&limit->rcur[lim]);
23                 vxwprintk(value,
24                         "!!! limit: %p[%s,%d] = %ld on exit.",
25                         limit, vlimit_name[lim], lim, value);
26         }
27 #endif
28 }
29