Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matt-wu/Ext3Fsd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wu <matt@ext2fsd.com>2016-09-13 18:47:13 +0300
committerMatt Wu <matt@ext2fsd.com>2016-09-13 19:06:48 +0300
commit73961f84b142e72eccd614f805e45094d71ae0e3 (patch)
treebfeb4cd532c378c432e9ec76c9d79a9017104cdb
parentd09519ee1cd3a1c4483eb43e8f587a70d604355d (diff)
FIXME: always grab Vcb->MainResource before syncing
-rw-r--r--Ext3Fsd/ext3/recover.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Ext3Fsd/ext3/recover.c b/Ext3Fsd/ext3/recover.c
index d85c0d1..ff3e07e 100644
--- a/Ext3Fsd/ext3/recover.c
+++ b/Ext3Fsd/ext3/recover.c
@@ -106,9 +106,12 @@ Ext2RecoverJournal(
journal_t * journal = NULL;
struct ext3_super_block *esb;
+ ExAcquireResourceExclusiveLite(&Vcb->MainResource, TRUE);
+
/* check journal inode number */
if (!Ext2CheckJournal(Vcb, &jNo)) {
- return -1;
+ rc = -1;
+ goto errorout;
}
/* allocate journal Mcb */
@@ -166,5 +169,7 @@ errorout:
Ext2FreeMcb(Vcb, jcb);
}
+ ExReleaseResourceLite(&Vcb->MainResource);
+
return rc;
}