diff options
author | Theodore Ts'o <tytso@mit.edu> | 2020-01-16 21:58:21 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-01-16 21:58:21 -0500 |
commit | f8e4f457d30ccff19833ddaf6514632f054a4418 (patch) | |
tree | 2b55235ef0d75f89e1a8816df44c75fad30f9a03 | |
parent | df659444466bae4ea78807da2cf021c135103268 (diff) | |
download | e2fsprogs-f8e4f457d30ccff19833ddaf6514632f054a4418.tar.gz |
e2fsck: clean up unwind_pass1() as it's no longer really needed
We now restart the full e2fsck instead of unwinding and restarting
pass1. So most of what used to be in unwind_pass1() has been moved
elsewhere. Let's git rid of it entirely, which simplifies and shrinks
pass1.c slightly.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | e2fsck/pass1.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index a57c1c067..ed85431da 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -129,16 +129,6 @@ static __u64 ext2_max_sizes[EXT2_MAX_BLOCK_LOG_SIZE - EXT2_MIN_BLOCK_LOG_SIZE + 1]; /* - * Free all memory allocated by pass1 in preparation for restarting - * things. - */ -static void unwind_pass1(ext2_filsys fs EXT2FS_ATTR((unused))) -{ - ext2fs_free_mem(&inodes_to_process); - inodes_to_process = 0; -} - -/* * Check to make sure a device inode is real. Returns 1 if the device * checks out, 0 if not. * @@ -2052,7 +2042,6 @@ void e2fsck_pass1(e2fsck_t ctx) * master superblock. */ ctx->use_superblock = 0; - unwind_pass1(fs); goto endit; } @@ -2064,9 +2053,10 @@ void e2fsck_pass1(e2fsck_t ctx) e2fsck_pass1_dupblocks(ctx, block_buf); } ctx->flags |= E2F_FLAG_ALLOC_OK; - ext2fs_free_mem(&inodes_to_process); endit: e2fsck_use_inode_shortcuts(ctx, 0); + ext2fs_free_mem(&inodes_to_process); + inodes_to_process = 0; if (scan) ext2fs_close_inode_scan(scan); |