diff options
author | Niu <niu@whamcloud.com> | 2011-11-14 10:58:28 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-11-14 10:58:28 -0500 |
commit | 7bed9a78828e56ddb687cf2b5f1d6ec1f5e5ecc6 (patch) | |
tree | ff7a9a9aa719b7e819b5fb3c424a2e193e163ba8 /lib | |
parent | cdfaa75901a66d02fa23f100e0346934371c3753 (diff) | |
download | e2fsprogs-7bed9a78828e56ddb687cf2b5f1d6ec1f5e5ecc6.tar.gz |
libquota: fix quota usage compute
In quota_compute_usage(), the space usage should be in bytes but
not quota block.
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/quota/mkquota.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/quota/mkquota.c b/lib/quota/mkquota.c index 2abb2d4e..832b135e 100644 --- a/lib/quota/mkquota.c +++ b/lib/quota/mkquota.c @@ -402,8 +402,7 @@ errcode_t quota_compute_usage(quota_ctx_t qctx) if (ino == 0) break; if (inode.i_links_count) { - /* Convert i_blocks to # of 1k blocks */ - space = (ext2fs_inode_i_blocks(fs, &inode) + 1) >> 1; + space = ext2fs_inode_i_blocks(fs, &inode) << 9; quota_data_add(qctx, &inode, ino, space); quota_data_inodes(qctx, &inode, ino, +1); } |