Skip to content

Commit

Permalink
filesys/cdfs: only set the Top Level IRP if locking succeed for lazy …
Browse files Browse the repository at this point in the history
…writer worker. (microsoft#209)

This avoids hitting the assert again NULL Top Level IRP later on if locking failed.
  • Loading branch information
HeisSpiter authored and wm1 committed Feb 25, 2018
1 parent 5db40a4 commit f73e552
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion filesys/cdfs/resrcsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit f73e552

Please sign in to comment.