Quota bugfix

From: Jan Kara
Date: Tue Oct 07 2003 - 06:48:54 EST


Hello,

I'm sending you a patch which should fix a problem with used-bytes
counter overflow in old quota format. The patch should apply well for
both 2.4.22 and 2.6.0-test6 kernels. Please apply.

Honza
--- linux/fs/quota_v1.c Tue Oct 7 12:44:00 2003
+++ linux/fs/quota_v1.c Tue Oct 7 12:44:16 2003
@@ -21,7 +21,7 @@
m->dqb_curinodes = d->dqb_curinodes;
m->dqb_bhardlimit = d->dqb_bhardlimit;
m->dqb_bsoftlimit = d->dqb_bsoftlimit;
- m->dqb_curspace = d->dqb_curblocks << QUOTABLOCK_BITS;
+ m->dqb_curspace = ((qsize_t)d->dqb_curblocks) << QUOTABLOCK_BITS;
m->dqb_itime = d->dqb_itime;
m->dqb_btime = d->dqb_btime;
}