mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[NTFS]
CcInitializeCacheMap can raise exceptions, wrap it into a SEH block svn path=/trunk/; revision=68228
This commit is contained in:
parent
f8ba038509
commit
bdc699aac8
2 changed files with 46 additions and 15 deletions
|
@ -263,11 +263,23 @@ NtfsFCBInitializeCache(PNTFS_VCB Vcb,
|
|||
Fcb->Vcb = Vcb;
|
||||
|
||||
Status = STATUS_SUCCESS;
|
||||
CcInitializeCacheMap(FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&(NtfsGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
_SEH2_TRY
|
||||
{
|
||||
CcInitializeCacheMap(FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&(NtfsGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
FileObject->FsContext2 = NULL;
|
||||
ExFreePoolWithTag(newCCB, TAG_CCB);
|
||||
ObDereferenceObject(FileObject);
|
||||
Fcb->FileObject = NULL;
|
||||
return _SEH2_GetExceptionCode();
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
ObDereferenceObject(FileObject);
|
||||
Fcb->Flags |= FCB_CACHE_INITIALIZED;
|
||||
|
@ -483,11 +495,21 @@ NtfsAttachFCBToFileObject(PNTFS_VCB Vcb,
|
|||
|
||||
if (!(Fcb->Flags & FCB_CACHE_INITIALIZED))
|
||||
{
|
||||
CcInitializeCacheMap(FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&(NtfsGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
_SEH2_TRY
|
||||
{
|
||||
CcInitializeCacheMap(FileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&(NtfsGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
FileObject->FsContext2 = NULL;
|
||||
ExFreePoolWithTag(newCCB, TAG_CCB);
|
||||
return _SEH2_GetExceptionCode();
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
Fcb->Flags |= FCB_CACHE_INITIALIZED;
|
||||
}
|
||||
|
|
|
@ -495,11 +495,20 @@ NtfsMountVolume(PDEVICE_OBJECT DeviceObject,
|
|||
// Fcb->Entry.ExtentLocationL = 0;
|
||||
// Fcb->Entry.DataLengthL = DeviceExt->CdInfo.VolumeSpaceSize * BLOCKSIZE;
|
||||
|
||||
CcInitializeCacheMap(Vcb->StreamFileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
FALSE,
|
||||
&(NtfsGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
_SEH2_TRY
|
||||
{
|
||||
CcInitializeCacheMap(Vcb->StreamFileObject,
|
||||
(PCC_FILE_SIZES)(&Fcb->RFCB.AllocationSize),
|
||||
TRUE,
|
||||
&(NtfsGlobalData->CacheMgrCallbacks),
|
||||
Fcb);
|
||||
}
|
||||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
goto ByeBye;
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
ExInitializeResourceLite(&Vcb->DirResource);
|
||||
|
||||
|
|
Loading…
Reference in a new issue