X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdrivers%2Ffilesystems%2Ffastfat%2Fcleanup.c;h=85b4ea2d2cb36ebb8ad5a80e8913b48bbff4856e;hp=07e2eb51470235fa7ab6ea9d2c9932a427c789a9;hb=0fa3874c257373fe8415250ae2e8bf25842220bc;hpb=67b277f50f5766dee542bc9b6548f07dfdea0a79 diff --git a/reactos/drivers/filesystems/fastfat/cleanup.c b/reactos/drivers/filesystems/fastfat/cleanup.c index 07e2eb51470..85b4ea2d2cb 100644 --- a/reactos/drivers/filesystems/fastfat/cleanup.c +++ b/reactos/drivers/filesystems/fastfat/cleanup.c @@ -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); }