sys: FspFsvolClose: convert CLOSE requests to synchronous when above the IOQ watermark

This commit is contained in:
Bill Zissimopoulos
2021-01-18 15:07:57 -08:00
parent 1dbcae3985
commit 0af0bfbe7c
3 changed files with 14 additions and 2 deletions

View File

@ -84,8 +84,9 @@ static NTSTATUS FspFsvolClose(
FspFileDescDelete(FileDesc); /* this will also close the MainFileObject if any */
FspFileNodeDereference(FileNode);
/* if we are closing files in the context of a rename make it synchronous */
if (FspFsvolDeviceFileRenameIsAcquiredExclusive(FsvolDeviceObject))
/* if closing in the context of a rename or IOQ is above the watermark make it synchronous */
if (FspFsvolDeviceFileRenameIsAcquiredExclusive(FsvolDeviceObject) ||
FspIoqPendingAboveWatermark(FspFsvolDeviceExtension(FsvolDeviceObject)->Ioq, 50))
{
/* acquire ownership of the Request */
Request->Hint = (UINT_PTR)Irp;