diff options
| author | Pierre Schweitzer <[email protected]> | 2018-02-25 05:44:06 +0100 |
|---|---|---|
| committer | Wei Mao <[email protected]> | 2018-02-24 20:44:06 -0800 |
| commit | f73e552f14ef61756b5fd1ebf8b5e98d8c6ca33b (patch) | |
| tree | b71c6b6ab76a7aaf677ce3620e0bb46fa272bc6d | |
| parent | 5db40a4daf10bdb19620d3d64215a60f2cd5378a (diff) | |
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.
| -rw-r--r-- | filesys/cdfs/resrcsup.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |
