[CDFS_NEW] Fix a bug in Microsoft CDFS implementation where the top level IRP

is set before locking is actually attempted for Cc worker thread (lazy write/read ahead).
So in case locking fails, the top level IRP is set and never unset, and latter
call will hit the assert where it expects the top level IRP to be NULL.

Should be reported upstream (tm).

CORE-14315
This commit is contained in:
Pierre Schweitzer 2018-02-12 20:45:12 +01:00
parent 6c9cdd84bb
commit a5e89014dc
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -164,10 +164,20 @@ Return Value:
{
PAGED_CODE();
#ifdef __REACTOS__
if (!ExAcquireResourceSharedLite( Fcb->Resource, Wait )) {
return FALSE;
}
#endif
NT_ASSERT(IoGetTopLevelIrp() == NULL);
IoSetTopLevelIrp((PIRP)FSRTL_CACHE_TOP_LEVEL_IRP);
#ifndef __REACTOS__
return ExAcquireResourceSharedLite( Fcb->Resource, Wait );
#else
return TRUE;
#endif
}