From fc65ad4d5f4b3063cc7a3b699d69c8dcbef89122 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 1 Nov 2014 21:09:10 +0000 Subject: [PATCH] [EXT2LIB] Whatever happened during format, always unmount the volume. This allows switching FS in usetup after formating an ext2 volume. As a record, before (read, with the IopParseDevice) hack, this wasn't possible and if formating with ext2 was possible, kernel would have written with either RawFS or FastFAT driver. Which is not exactly what we want ;-). But no joy guys... The Ext2Fsd needs to work in ReactOS first before we can effectively install ReactOS on ext2 volumes. In any case, that's a clear step forward :-) svn path=/trunk/; revision=65174 --- reactos/lib/fslib/ext2lib/Mke2fs.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/reactos/lib/fslib/ext2lib/Mke2fs.c b/reactos/lib/fslib/ext2lib/Mke2fs.c index 647740889be..62757e9e2ed 100644 --- a/reactos/lib/fslib/ext2lib/Mke2fs.c +++ b/reactos/lib/fslib/ext2lib/Mke2fs.c @@ -987,16 +987,10 @@ clean_up: ext2_free_block_bitmap(&FileSys); ext2_free_inode_bitmap(&FileSys); - if (!bRet) + if(bLocked) { Ext2DisMountVolume(&FileSys); - } - else - { - if(bLocked) - { - Ext2UnLockVolume(&FileSys); - } + Ext2UnLockVolume(&FileSys); } Ext2CloseDevice(&FileSys);