diff -NurpP --minimal linux-2.6.14.2-vs2.1.0-rc7.2/include/linux/vserver/dlimit.h linux-2.6.14.2-vs2.1.0-rc7.3/include/linux/vserver/dlimit.h --- linux-2.6.14.2-vs2.1.0-rc7.2/include/linux/vserver/dlimit.h 2005-11-16 15:59:38 +0100 +++ linux-2.6.14.2-vs2.1.0-rc7.3/include/linux/vserver/dlimit.h 2005-11-17 07:21:18 +0100 @@ -10,7 +10,6 @@ #define DLIM_UNSET (0ULL) #define DLIM_INFINITY (~0ULL) -#define DLIM_KEEP (~1ULL) #include @@ -27,10 +26,10 @@ struct dl_info { spinlock_t dl_lock; /* protect the values */ - uint64_t dl_space_used; /* used space in bytes */ - uint64_t dl_space_total; /* maximum space in bytes */ - uint32_t dl_inodes_used; /* used inodes */ - uint32_t dl_inodes_total; /* maximum inodes */ + unsigned long long dl_space_used; /* used space in bytes */ + unsigned long long dl_space_total; /* maximum space in bytes */ + unsigned long dl_inodes_used; /* used inodes */ + unsigned long dl_inodes_total; /* maximum inodes */ unsigned int dl_nrlmult; /* non root limit mult */ }; diff -NurpP --minimal linux-2.6.14.2-vs2.1.0-rc7.2/kernel/vserver/dlimit.c linux-2.6.14.2-vs2.1.0-rc7.3/kernel/vserver/dlimit.c --- linux-2.6.14.2-vs2.1.0-rc7.2/kernel/vserver/dlimit.c 2005-10-29 04:45:24 +0200 +++ linux-2.6.14.2-vs2.1.0-rc7.3/kernel/vserver/dlimit.c 2005-11-17 07:22:46 +0100 @@ -301,11 +301,11 @@ int do_set_dlimit(uint32_t id, const cha goto out_release; if (!(sb = nd.dentry->d_inode->i_sb)) goto out_release; - if ((reserved != (uint32_t)CDLIM_KEEP && + if ((reserved != CDLIM_KEEP && reserved > 100) || - (inodes_used != (uint32_t)CDLIM_KEEP && + (inodes_used != CDLIM_KEEP && inodes_used > inodes_total) || - (space_used != (uint32_t)CDLIM_KEEP && + (space_used != CDLIM_KEEP && space_used > space_total)) goto out_release; @@ -316,21 +316,21 @@ int do_set_dlimit(uint32_t id, const cha spin_lock(&dli->dl_lock); - if (inodes_used != (uint32_t)CDLIM_KEEP) + if (inodes_used != CDLIM_KEEP) dli->dl_inodes_used = inodes_used; - if (inodes_total != (uint32_t)CDLIM_KEEP) + if (inodes_total != CDLIM_KEEP) dli->dl_inodes_total = inodes_total; - if (space_used != (uint32_t)CDLIM_KEEP) { + if (space_used != CDLIM_KEEP) { dli->dl_space_used = space_used; dli->dl_space_used <<= 10; } - if (space_total == (uint32_t)CDLIM_INFINITY) - dli->dl_space_total = (uint64_t)CDLIM_INFINITY; - else if (space_total != (uint32_t)CDLIM_KEEP) { + if (space_total == CDLIM_INFINITY) + dli->dl_space_total = DLIM_INFINITY; + else if (space_total != CDLIM_KEEP) { dli->dl_space_total = space_total; dli->dl_space_total <<= 10; } - if (reserved != (uint32_t)CDLIM_KEEP) + if (reserved != CDLIM_KEEP) dli->dl_nrlmult = (1 << 10) * (100 - reserved) / 100; spin_unlock(&dli->dl_lock); @@ -408,8 +408,8 @@ int do_get_dlimit(uint32_t id, const cha *inodes_used = dli->dl_inodes_used; *inodes_total = dli->dl_inodes_total; *space_used = dli->dl_space_used >> 10; - if (dli->dl_space_total == (uint64_t)CDLIM_INFINITY) - *space_total = (uint32_t)CDLIM_INFINITY; + if (dli->dl_space_total == DLIM_INFINITY) + *space_total = CDLIM_INFINITY; else *space_total = dli->dl_space_total >> 10; @@ -487,7 +487,7 @@ void vx_vsi_statfs(struct super_block *s return; spin_lock(&dli->dl_lock); - if (dli->dl_inodes_total == (uint32_t)CDLIM_INFINITY) + if (dli->dl_inodes_total == (unsigned long)DLIM_INFINITY) goto no_ilim; /* reduce max inodes available to limit */ @@ -500,7 +500,7 @@ void vx_vsi_statfs(struct super_block *s buf->f_ffree = ifree; no_ilim: - if (dli->dl_space_total == (uint64_t)CDLIM_INFINITY) + if (dli->dl_space_total == DLIM_INFINITY) goto no_blim; blimit = dli->dl_space_total >> sb->s_blocksize_bits;