From f73e552f14ef61756b5fd1ebf8b5e98d8c6ca33b Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 25 Feb 2018 05:44:06 +0100 Subject: filesys/cdfs: only set the Top Level IRP if locking succeed for lazy writer worker. (#209) This avoids hitting the assert again NULL Top Level IRP later on if locking failed. --- filesys/cdfs/resrcsup.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/filesys/cdfs/resrcsup.c b/filesys/cdfs/resrcsup.c index 86b2b91a..78f0a823 100644 --- a/filesys/cdfs/resrcsup.c +++ b/filesys/cdfs/resrcsup.c @@ -161,10 +161,15 @@ Return Value: { PAGED_CODE(); + if (!ExAcquireResourceSharedLite( Fcb->Resource, Wait )) { + + return FALSE; + } + NT_ASSERT(IoGetTopLevelIrp() == NULL); IoSetTopLevelIrp((PIRP)FSRTL_CACHE_TOP_LEVEL_IRP); - return ExAcquireResourceSharedLite( Fcb->Resource, Wait ); + return TRUE; } -- cgit v1.3.1