From e1c4e3ae3ab33aa6cf80428108dc25c0635c9348 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 10 May 2015 14:36:00 +0000 Subject: [PATCH] [NTFS] Don't force the run-time priority boost in NtfsFsdDispatch(). Some dispatched MJ functions might want to adjust it (MJ_READ/MJ_WRITE/MJ_CREATE). The same should be actually done in FastFAT. I believe that would help avoiding several code duplications... svn path=/trunk/; revision=67624 --- reactos/drivers/filesystems/ntfs/dispatch.c | 2 +- reactos/drivers/filesystems/ntfs/finfo.c | 8 ++++---- reactos/drivers/filesystems/ntfs/misc.c | 1 + reactos/drivers/filesystems/ntfs/ntfs.h | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/reactos/drivers/filesystems/ntfs/dispatch.c b/reactos/drivers/filesystems/ntfs/dispatch.c index 6f573773437..7a08fc15c60 100644 --- a/reactos/drivers/filesystems/ntfs/dispatch.c +++ b/reactos/drivers/filesystems/ntfs/dispatch.c @@ -82,7 +82,7 @@ NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject, Status = STATUS_INSUFFICIENT_RESOURCES; Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoCompleteRequest(Irp, IrpContext->PriorityBoost); if (IrpContext) ExFreePoolWithTag(IrpContext, 'PRIN'); diff --git a/reactos/drivers/filesystems/ntfs/finfo.c b/reactos/drivers/filesystems/ntfs/finfo.c index 03126dfb069..3b12678cf17 100644 --- a/reactos/drivers/filesystems/ntfs/finfo.c +++ b/reactos/drivers/filesystems/ntfs/finfo.c @@ -271,10 +271,10 @@ NtfsQueryInformation(PNTFS_IRP_CONTEXT IrpContext) case FileNameInformation: Status = NtfsGetNameInformation(FileObject, - Fcb, - DeviceObject, - SystemBuffer, - &BufferLength); + Fcb, + DeviceObject, + SystemBuffer, + &BufferLength); break; case FileInternalInformation: diff --git a/reactos/drivers/filesystems/ntfs/misc.c b/reactos/drivers/filesystems/ntfs/misc.c index 2544b37a3b2..97ceab1b40e 100644 --- a/reactos/drivers/filesystems/ntfs/misc.c +++ b/reactos/drivers/filesystems/ntfs/misc.c @@ -87,6 +87,7 @@ NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject, IrpContext->MinorFunction = IrpContext->Stack->MinorFunction; IrpContext->FileObject = IrpContext->Stack->FileObject; IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp); + IrpContext->PriorityBoost = IO_NO_INCREMENT; if (IrpContext->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL || IrpContext->MajorFunction == IRP_MJ_DEVICE_CONTROL || diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/reactos/drivers/filesystems/ntfs/ntfs.h index 07fc6371950..e4e2a34950c 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.h +++ b/reactos/drivers/filesystems/ntfs/ntfs.h @@ -406,6 +406,7 @@ typedef struct PDEVICE_OBJECT DeviceObject; PFILE_OBJECT FileObject; NTSTATUS SavedExceptionCode; + CCHAR PriorityBoost; } NTFS_IRP_CONTEXT, *PNTFS_IRP_CONTEXT; typedef struct _NTFS_ATTR_CONTEXT -- 2.17.1