diff options
author | Yongqiang Yang <xiaoqiangnk@gmail.com> | 2011-09-16 09:25:51 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-09-16 09:28:44 -0400 |
commit | 32318ff20f848a18d39e22c93ca06d5444651cd1 (patch) | |
tree | 6979ae13083fc89838fb8a5ebc0cd62b0d5d5f8d /e2fsck/pass5.c | |
parent | 98f4547198b369bef7e41eb7ce4a16855726c393 (diff) | |
download | e2fsprogs-32318ff20f848a18d39e22c93ca06d5444651cd1.tar.gz |
e2fsck: fix error in computing blocks of the ending group
If the blocks of a filesystem is a multiple of blocks_per_group,
blocks of the ending group is computed wrongly. Use the
new ext2fs_group_blocks_count() helper instead.
Eric Sandeen: Converted to use new blocks per group helper
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'e2fsck/pass5.c')
-rw-r--r-- | e2fsck/pass5.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c index cf37556e..d4b08686 100644 --- a/e2fsck/pass5.c +++ b/e2fsck/pass5.c @@ -226,9 +226,8 @@ redo_counts: count = 0; cmp_block = fs->super->s_clusters_per_group; if (group == (int)fs->group_desc_count - 1) - cmp_block = - EXT2FS_NUM_B2C(fs, - ext2fs_blocks_count(fs->super) % fs->super->s_blocks_per_group); + cmp_block = EXT2FS_NUM_B2C(fs, + ext2fs_group_blocks_count(fs, group)); } bitmap = 0; |