From: Pierre Schweitzer Date: Sun, 26 Oct 2014 20:29:00 +0000 (+0000) Subject: [FASTFAT] X-Git-Tag: backups/tcpip_revolution@71025~225 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=a71e1f3760bfaada8e3cc0fd4d0290dd6f7fc9c2 [FASTFAT] Make sure the appropriate resource is exclusively acquired when playing with FCB references svn path=/trunk/; revision=65033 --- diff --git a/reactos/drivers/filesystems/fastfat/fcb.c b/reactos/drivers/filesystems/fastfat/fcb.c index 0b5f24a345b..c698ba72efe 100644 --- a/reactos/drivers/filesystems/fastfat/fcb.c +++ b/reactos/drivers/filesystems/fastfat/fcb.c @@ -292,6 +292,8 @@ vfatGrabFCB( PDEVICE_EXTENSION pVCB, PVFATFCB pFCB) { + ASSERT(ExIsResourceAcquiredExclusive(&pVCB->DirResource)); + ++pFCB->RefCount; } @@ -305,6 +307,8 @@ vfatReleaseFCB( DPRINT("releasing FCB at %p: %wZ, refCount:%d\n", pFCB, &pFCB->PathNameU, pFCB->RefCount); + ASSERT(ExIsResourceAcquiredExclusive(&pVCB->DirResource)); + while (pFCB) { pFCB->RefCount--;