From: Theodore Ts'o Date: Thu, 26 Jul 2001 13:02:56 +0000 (-0400) Subject: pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of pass 1. X-Git-Tag: E2FSPROGS-1_23-WIP-0727~12 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=24ceb248abfb0ee0cd0e7861e2bc83e6c8c61ad7;p=tools%2Fe2fsprogs.git pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of pass 1. This avoids increasing the memory footprint of e2fsck by 10%! --- diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 22b4708..af2125e 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,8 @@ +2001-07-26 Theodore Tso + + * pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of + pass 1. + 2001-07-25 Theodore Tso * pass1.c (check_ext_attr): Skip zero-length EA entries. diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 6d763d2..3df234d 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -646,6 +646,12 @@ void e2fsck_pass1(e2fsck_t ctx) if (ctx->invalid_bitmaps) handle_fs_bad_blocks(ctx); + /* We don't need the block_ea_map any more */ + if (ctx->block_ea_map) { + ext2fs_free_block_bitmap(ctx->block_ea_map); + ctx->block_ea_map = 0; + } + if (ctx->flags & E2F_FLAG_RESTART) { /* * Only the master copy of the superblock and block