From patchwork Thu Aug 4 03:48:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/2,bigalloc] e2fsprogs: remove wrong EXT2FS_C2B in check_block_end Date: Wed, 03 Aug 2011 17:48:02 -0000 From: Robin Dong X-Patchwork-Id: 108344 Message-Id: <1312429682-16970-2-git-send-email-hao.bigrat@gmail.com> To: linux-ext4@vger.kernel.org Cc: Robin Dong , Ted Ts'o From: Robin Dong The argument "save_blocks_count" and the block bitmap has the unit of cluster, so it don't need EXT2FS_C2B to convert argument "i". This patch is based on "next" branch of e2fsprogs. Signed-off-by: Robin Dong Cc: Ted Ts'o --- e2fsck/pass5.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c index f9d746c..bb2a4dd 100644 --- a/e2fsck/pass5.c +++ b/e2fsck/pass5.c @@ -763,12 +763,10 @@ static void check_block_end(e2fsck_t ctx) /* Protect loop from wrap-around if end is maxed */ for (i = save_blocks_count + 1; i <= end && i > save_blocks_count; i++) { - if (!ext2fs_test_block_bitmap2(fs->block_map, - EXT2FS_C2B(fs, i))) { + if (!ext2fs_test_block_bitmap2(fs->block_map, i)) { if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx)) { for (; i <= end; i++) - ext2fs_mark_block_bitmap2(fs->block_map, - EXT2FS_C2B(fs, i)); + ext2fs_mark_block_bitmap2(fs->block_map, i); ext2fs_mark_bb_dirty(fs); } else ext2fs_unmark_valid(fs);