lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1332386476-25673-1-git-send-email-tytso@mit.edu>
Date:	Wed, 21 Mar 2012 23:21:16 -0400
From:	Theodore Ts'o <tytso@....edu>
To:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Cc:	Theodore Ts'o <tytso@....edu>,
	Andreas Dilger <adilger@...mcloud.com>
Subject: [PATCH] e2fsck: avoid unnecessary close/reopen for non-MMP filesystems

For file systems that do not use MMP, there's no reason to close the
file system and then re-open the file system a second time, since
EXT2_FLAG_SKIP_MMP has no meaning for non-MMP file systems anyway.

Signed-off-by: "Theodore Ts'o" <tytso@....edu>
Cc: Andreas Dilger <adilger@...mcloud.com>
---
 e2fsck/unix.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 59c52ff..d0b10d4 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1398,12 +1398,10 @@ failure:
 	    (flags & EXT2_FLAG_SKIP_MMP)) {
 		if (e2fsck_check_mmp(fs, ctx))
 			fatal_error(ctx, 0);
-	}
 
-	 /*
-	  * Restart in order to reopen fs but this time start mmp.
-	  */
-	if (flags & EXT2_FLAG_SKIP_MMP) {
+		/*
+		 * Restart in order to reopen fs but this time start mmp.
+		 */
 		ext2fs_close(fs);
 		ctx->fs = NULL;
 		flags &= ~EXT2_FLAG_SKIP_MMP;
-- 
1.7.9.107.g97f9a

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ