Whamcloud - gitweb
pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of pass 1.
authorTheodore Ts'o <tytso@mit.edu>
Thu, 26 Jul 2001 13:02:56 +0000 (09:02 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 26 Jul 2001 13:02:56 +0000 (09:02 -0400)
This avoids increasing the memory footprint of e2fsck by 10%!

e2fsck/ChangeLog
e2fsck/pass1.c

index 22b4708..af2125e 100644 (file)
@@ -1,3 +1,8 @@
+2001-07-26  Theodore Tso  <tytso@valinux.com>
+
+       * pass1.c (e2fsck_pass1): Free ctx->block_ea_map at the end of
+               pass 1.
+
 2001-07-25  Theodore Tso  <tytso@valinux.com>
 
        * pass1.c (check_ext_attr): Skip zero-length EA entries.
index 6d763d2..3df234d 100644 (file)
@@ -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