[PATCH] mke2fs: fix up the commit "mke2fs.c: add an option: -d root-directory"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Otherwise lots of test failures!

Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>
---
 misc/mke2fs.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index d82ccbb..28537da 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -2779,26 +2779,8 @@ no_journal:
 				       EXT4_FEATURE_RO_COMPAT_QUOTA))
 		create_quota_inodes(fs);
 
-	if (!quiet)
-		printf(_("Writing superblocks and "
-		       "filesystem accounting information: "));
 	checkinterval = fs->super->s_checkinterval;
 	max_mnt_count = fs->super->s_max_mnt_count;
-	if (retval) {
-		fprintf(stderr,
-			_("\nWarning, had trouble writing out superblocks."));
-	} else if (!quiet) {
-		printf(_("done\n\n"));
-		if (!getenv("MKE2FS_SKIP_CHECK_MSG"))
-			print_check_message(max_mnt_count, checkinterval);
-	}
-
-	remove_error_table(&et_ext2_error_table);
-	remove_error_table(&et_prof_error_table);
-	profile_release(profile);
-	for (i=0; fs_types[i]; i++)
-		free(fs_types[i]);
-	free(fs_types);
 
 	/* Copy files from the specified directory */
 	if (root_dir) {
@@ -2824,7 +2806,25 @@ no_journal:
 				_("\nError while populating %s"), root_dir);
 	}
 
+	if (!quiet)
+		printf(_("Writing superblocks and "
+		       "filesystem accounting information: "));
 	retval = ext2fs_close(fs);
+	if (retval) {
+		fprintf(stderr,
+			_("\nWarning, had trouble writing out superblocks."));
+	} else if (!quiet) {
+		printf(_("done\n\n"));
+		if (!getenv("MKE2FS_SKIP_CHECK_MSG"))
+			print_check_message(max_mnt_count, checkinterval);
+	}
+
+	remove_error_table(&et_ext2_error_table);
+	remove_error_table(&et_prof_error_table);
+	profile_release(profile);
+	for (i=0; fs_types[i]; i++)
+		free(fs_types[i]);
+	free(fs_types);
 
 	return retval;
 }
-- 
1.7.12.rc0.22.gcdd159b

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux