mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[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 svn path=/trunk/; revision=75908
This commit is contained in:
parent
67b277f50f
commit
0fa3874c25
2 changed files with 8 additions and 4 deletions
|
@ -25,6 +25,7 @@ VfatCleanupFile(
|
|||
{
|
||||
PVFATFCB pFcb;
|
||||
PVFATCCB pCcb;
|
||||
BOOLEAN IsVolume;
|
||||
PDEVICE_EXTENSION DeviceExt = IrpContext->DeviceExt;
|
||||
PFILE_OBJECT FileObject = IrpContext->FileObject;
|
||||
|
||||
|
@ -36,7 +37,8 @@ VfatCleanupFile(
|
|||
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 @@ VfatCleanupFile(
|
|||
}
|
||||
|
||||
#ifdef ENABLE_SWAPOUT
|
||||
if (BooleanFlagOn(DeviceExt->Flags, VCB_DISMOUNT_PENDING))
|
||||
if (IsVolume && BooleanFlagOn(DeviceExt->Flags, VCB_DISMOUNT_PENDING))
|
||||
{
|
||||
VfatCheckForDismount(DeviceExt, FALSE);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ VfatCloseFile(
|
|||
{
|
||||
PVFATFCB pFcb;
|
||||
PVFATCCB pCcb;
|
||||
BOOLEAN IsVolume;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
|
||||
DPRINT("VfatCloseFile(DeviceExt %p, FileObject %p)\n",
|
||||
|
@ -39,7 +40,8 @@ VfatCloseFile(
|
|||
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 @@ VfatCloseFile(
|
|||
}
|
||||
|
||||
#ifdef ENABLE_SWAPOUT
|
||||
if (DeviceExt->OpenHandleCount == 0)
|
||||
if (IsVolume && DeviceExt->OpenHandleCount == 0)
|
||||
{
|
||||
VfatCheckForDismount(DeviceExt, FALSE);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue