[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 10 May 2015 14:36:00 +0000 (14:36 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 10 May 2015 14:36:00 +0000 (14:36 +0000)
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
reactos/drivers/filesystems/ntfs/finfo.c
reactos/drivers/filesystems/ntfs/misc.c
reactos/drivers/filesystems/ntfs/ntfs.h

index 6f57377..7a08fc1 100644 (file)
@@ -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');
index 03126df..3b12678 100644 (file)
@@ -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:
index 2544b37..97ceab1 100644 (file)
@@ -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 ||
index 07fc637..e4e2a34 100644 (file)
@@ -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