Author: pschweitzer
Date: Tue Sep 19 21:19:55 2017
New Revision: 75908
URL:
http://svn.reactos.org/svn/reactos?rev=75908&view=rev
Log:
[FASTFAT]
Only perform dismount check on close/cleanup for volume opening.
This prevents random dismounts and fixes 1st stage when ENABLE_SWAPOUT is enabled in
FastFAT (disabled by default).
CORE-13805
Modified:
trunk/reactos/drivers/filesystems/fastfat/cleanup.c
trunk/reactos/drivers/filesystems/fastfat/close.c
Modified: trunk/reactos/drivers/filesystems/fastfat/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] Tue Sep 19 21:19:55
2017
@@ -25,6 +25,7 @@
{
PVFATFCB pFcb;
PVFATCCB pCcb;
+ BOOLEAN IsVolume;
PDEVICE_EXTENSION DeviceExt = IrpContext->DeviceExt;
PFILE_OBJECT FileObject = IrpContext->FileObject;
@@ -36,7 +37,8 @@
if (!pFcb)
return STATUS_SUCCESS;
- if (BooleanFlagOn(pFcb->Flags, FCB_IS_VOLUME))
+ IsVolume = BooleanFlagOn(pFcb->Flags, FCB_IS_VOLUME);
+ if (IsVolume)
{
pFcb->OpenHandleCount--;
@@ -145,7 +147,7 @@
}
#ifdef ENABLE_SWAPOUT
- if (BooleanFlagOn(DeviceExt->Flags, VCB_DISMOUNT_PENDING))
+ if (IsVolume && BooleanFlagOn(DeviceExt->Flags, VCB_DISMOUNT_PENDING))
{
VfatCheckForDismount(DeviceExt, FALSE);
}
Modified: trunk/reactos/drivers/filesystems/fastfat/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/close.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/close.c [iso-8859-1] Tue Sep 19 21:19:55
2017
@@ -25,6 +25,7 @@
{
PVFATFCB pFcb;
PVFATCCB pCcb;
+ BOOLEAN IsVolume;
NTSTATUS Status = STATUS_SUCCESS;
DPRINT("VfatCloseFile(DeviceExt %p, FileObject %p)\n",
@@ -39,7 +40,8 @@
return STATUS_SUCCESS;
}
- if (BooleanFlagOn(pFcb->Flags, FCB_IS_VOLUME))
+ IsVolume = BooleanFlagOn(pFcb->Flags, FCB_IS_VOLUME);
+ if (IsVolume)
{
DPRINT("Volume\n");
FileObject->FsContext2 = NULL;
@@ -59,7 +61,7 @@
}
#ifdef ENABLE_SWAPOUT
- if (DeviceExt->OpenHandleCount == 0)
+ if (IsVolume && DeviceExt->OpenHandleCount == 0)
{
VfatCheckForDismount(DeviceExt, FALSE);
}