From: Alex Elder Date: Wed, 24 Aug 2011 21:53:41 +0000 (+0000) Subject: xfsprogs: xfs_quota: return real-time used data as intended X-Git-Tag: v3.1.6~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1affe13718816b3404b555b761dfe35660731cc9;p=thirdparty%2Fxfsprogs-dev.git xfsprogs: xfs_quota: return real-time used data as intended In projects_free_space_data() the real-time used space consumption is never set. Instead, that value is returned in the field that should hold the quota limit. Found by inspection. Never seen/noticed because we currently don't support quotas when a filesystem has a realtime volume. Signed-off-by: Alex Elder Reviewed-by: Christoph Hellwig --- diff --git a/quota/free.c b/quota/free.c index 825ce34f2..26ec293a1 100644 --- a/quota/free.c +++ b/quota/free.c @@ -177,16 +177,18 @@ projects_free_space_data( *bfree = (d.d_blk_softlimit - d.d_bcount) << 1; } *bused = d.d_bcount << 1; + if (d.d_ino_softlimit) { *icount = d.d_ino_softlimit; *ifree = (d.d_ino_softlimit - d.d_icount); } *iused = d.d_icount; + if (d.d_rtb_softlimit) { *rcount = d.d_rtb_softlimit << 1; *rfree = (d.d_rtb_softlimit - d.d_rtbcount) << 1; } - *rcount = d.d_rtbcount << 1; + *rused = d.d_rtbcount << 1; close(fd); return 1;