Skip to contentSkip to conversation

libext2fs: ext2fs_open2() should not set ret_fs after a MMP failure

PATCH New Theodore Ts'o 1 participant 1 message Jan 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libext2fs: ext2fs_open2() should not set ret_fs after a MMP failure

The addition of MMP code was added in the wrong place, so ret_fs could get set (and EXT2_FLAG_NOFREE_ON_ERROR was cleared as well, which could confuse e2fsck which depends on this flag being cleared if ext2fs_open2() succeeded.)

---
 lib/ext2fs/openfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
lib/ext2fs/openfs.c +0 -2
index d483bd9..113b80e 100644
@@ -391,9 +391,6 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
 			ext2fs_mark_super_dirty(fs);
 	}
 
-	fs->flags &= ~EXT2_FLAG_NOFREE_ON_ERROR;
-	*ret_fs = fs;