[FASTFAT]
[reactos.git] / reactos / drivers / filesystems / fastfat / rw.c
index bbcae94..8b8021a 100644 (file)
@@ -537,7 +537,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext)
    PERESOURCE Resource = NULL;
    LARGE_INTEGER ByteOffset;
    PVOID Buffer;
-   PDEVICE_OBJECT DeviceToVerify;
    ULONG BytesPerSector;
 
    ASSERT(IrpContext);
@@ -561,17 +560,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext)
 
    DPRINT("<%wZ>\n", &Fcb->PathNameU);
 
-   if (Fcb->Flags & FCB_IS_PAGE_FILE)
-   {
-      PFATINFO FatInfo = &IrpContext->DeviceExt->FatInfo;
-      IrpContext->Stack->Parameters.Read.ByteOffset.QuadPart += FatInfo->dataStart * FatInfo->BytesPerSector;
-      IoSkipCurrentIrpStackLocation(IrpContext->Irp);
-      DPRINT("Read from page file, disk offset %I64x\n", IrpContext->Stack->Parameters.Read.ByteOffset.QuadPart);
-      Status = IoCallDriver(IrpContext->DeviceExt->StorageDevice, IrpContext->Irp);
-      VfatFreeIrpContext(IrpContext);
-      return Status;
-   }
-
    ByteOffset = IrpContext->Stack->Parameters.Read.ByteOffset;
    Length = IrpContext->Stack->Parameters.Read.Length;
    BytesPerSector = IrpContext->DeviceExt->FatInfo.BytesPerSector;
@@ -697,22 +685,6 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext)
         }
 
       Status = VfatReadFileData(IrpContext, Length, ByteOffset, &ReturnedLength);
-/**/
-      if (Status == STATUS_VERIFY_REQUIRED)
-      {
-         DPRINT("VfatReadFile returned STATUS_VERIFY_REQUIRED\n");
-         DeviceToVerify = IoGetDeviceToVerify(PsGetCurrentThread());
-         IoSetDeviceToVerify(PsGetCurrentThread(), DeviceToVerify);
-         Status = IoVerifyVolume (DeviceToVerify, FALSE);
-
-         if (NT_SUCCESS(Status))
-         {
-            Status = VfatReadFileData(IrpContext, Length,
-                                      ByteOffset, &ReturnedLength);
-         }
-
-      }
-/**/
       if (NT_SUCCESS(Status))
       {
          IrpContext->Irp->IoStatus.Information = ReturnedLength;
@@ -766,7 +738,6 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
    LARGE_INTEGER OldFileSize;
    NTSTATUS Status = STATUS_SUCCESS;
    ULONG Length = 0;
-   ULONG OldAllocationSize;
    PVOID Buffer;
    ULONG BytesPerSector;
 
@@ -791,17 +762,6 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
 
    DPRINT("<%wZ>\n", &Fcb->PathNameU);
 
-   if (Fcb->Flags & FCB_IS_PAGE_FILE)
-   {
-      PFATINFO FatInfo = &IrpContext->DeviceExt->FatInfo;
-      IrpContext->Stack->Parameters.Write.ByteOffset.QuadPart += FatInfo->dataStart * FatInfo->BytesPerSector;
-      IoSkipCurrentIrpStackLocation(IrpContext->Irp);
-      DPRINT("Write to page file, disk offset %I64x\n", IrpContext->Stack->Parameters.Write.ByteOffset.QuadPart);
-      Status = IoCallDriver(IrpContext->DeviceExt->StorageDevice, IrpContext->Irp);
-      VfatFreeIrpContext(IrpContext);
-      return Status;
-   }
-
   /* fail if file is a directory and no paged read */
    if (*Fcb->Attributes & FILE_ATTRIBUTE_DIRECTORY && !(IrpContext->Irp->Flags & IRP_PAGING_IO))
    {
@@ -922,7 +882,6 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
    }
 
    OldFileSize = Fcb->RFCB.FileSize;
-   OldAllocationSize = Fcb->RFCB.AllocationSize.u.LowPart;
 
    Buffer = VfatGetUserBuffer(IrpContext->Irp);
    if (!Buffer)