diff -NurpP --minimal linux-2.6.16.20-vs2.1.1-rc22.3/include/linux/vserver/limit_cmd.h linux-2.6.16.20-vs2.1.1-rc22.3.1/include/linux/vserver/limit_cmd.h --- linux-2.6.16.20-vs2.1.1-rc22.3/include/linux/vserver/limit_cmd.h 2006-04-26 19:07:00 +0200 +++ linux-2.6.16.20-vs2.1.1-rc22.3.1/include/linux/vserver/limit_cmd.h 2006-06-17 23:23:51 +0200 @@ -7,6 +7,7 @@ #define VCMD_get_rlimit VC_CMD(RLIMIT, 1, 0) #define VCMD_set_rlimit VC_CMD(RLIMIT, 2, 0) #define VCMD_get_rlimit_mask VC_CMD(RLIMIT, 3, 0) +#define VCMD_reset_minmax VC_CMD(RLIMIT, 9, 0) struct vcmd_ctx_rlimit_v0 { uint32_t id; @@ -43,6 +44,7 @@ struct vcmd_ctx_rlimit_v0_x32 { extern int vc_get_rlimit(uint32_t, void __user *); extern int vc_set_rlimit(uint32_t, void __user *); extern int vc_get_rlimit_mask(uint32_t, void __user *); +extern int vc_reset_minmax(uint32_t, void __user *); #ifdef CONFIG_IA32_EMULATION diff -NurpP --minimal linux-2.6.16.20-vs2.1.1-rc22.3/kernel/vserver/limit.c linux-2.6.16.20-vs2.1.1-rc22.3.1/kernel/vserver/limit.c --- linux-2.6.16.20-vs2.1.1-rc22.3/kernel/vserver/limit.c 2006-05-02 02:12:38 +0200 +++ linux-2.6.16.20-vs2.1.1-rc22.3.1/kernel/vserver/limit.c 2006-06-17 23:19:46 +0200 @@ -220,6 +220,36 @@ int vc_get_rlimit_mask(uint32_t id, void } +static inline void vx_reset_minmax(struct _vx_limit *limit) +{ + rlim_t value; + int lim; + + for (lim=0; limlimit); + put_vx_info(vxi); + return 0; +} + + void vx_vsi_meminfo(struct sysinfo *val) { struct vx_info *vxi = current->vx_info; diff -NurpP --minimal linux-2.6.16.20-vs2.1.1-rc22.3/kernel/vserver/switch.c linux-2.6.16.20-vs2.1.1-rc22.3.1/kernel/vserver/switch.c --- linux-2.6.16.20-vs2.1.1-rc22.3/kernel/vserver/switch.c 2006-04-26 19:07:00 +0200 +++ linux-2.6.16.20-vs2.1.1-rc22.3.1/kernel/vserver/switch.c 2006-06-17 23:20:25 +0200 @@ -156,6 +156,8 @@ long do_vserver(uint32_t cmd, uint32_t i #endif case VCMD_get_rlimit_mask: return vc_get_rlimit_mask(id, data); + case VCMD_reset_minmax: + return vc_reset_minmax(id, data); case VCMD_get_vhi_name: return vc_get_vhi_name(id, data);