Author: fireball
Date: Wed Dec 6 16:29:21 2006
New Revision: 25073
URL:
http://svn.reactos.org/svn/reactos?rev=25073&view=rev
Log:
- vfat now checks what CcCopyRead() returned, and return that value to the caller in case
of failure
- Added a check for successful call to ReadCacheSegmentChain() in CC
See issue #1855 for more details.
Modified:
trunk/reactos/drivers/filesystems/vfat/rw.c
trunk/reactos/ntoskrnl/cc/copy.c
Modified: trunk/reactos/drivers/filesystems/vfat/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/vfat/r…
==============================================================================
--- trunk/reactos/drivers/filesystems/vfat/rw.c (original)
+++ trunk/reactos/drivers/filesystems/vfat/rw.c Wed Dec 6 16:29:21 2006
@@ -689,7 +689,7 @@
(BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT), Buffer,
&IrpContext->Irp->IoStatus))
{
- Status = STATUS_PENDING;
+ Status = IrpContext->Irp->IoStatus.Status;//STATUS_PENDING;
goto ByeBye;
}
CHECKPOINT;
Modified: trunk/reactos/ntoskrnl/cc/copy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/copy.c?rev=250…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/copy.c (original)
+++ trunk/reactos/ntoskrnl/cc/copy.c Wed Dec 6 16:29:21 2006
@@ -382,6 +382,15 @@
{
TempLength = min(max(Bcb->CacheSegmentSize, MAX_RW_LENGTH), Length);
ReadCacheSegmentChain(Bcb, ReadOffset, TempLength, Buffer);
+ Status = ReadCacheSegmentChain(Bcb, ReadOffset, TempLength, Buffer);
+ if (!NT_SUCCESS(Status))
+ {
+ IoStatus->Information = 0;
+ IoStatus->Status = Status;
+ DPRINT1("ReadCacheSegmentChain failed, Status %x\n", Status);
+ return FALSE;
+ }
+
ReadLength += TempLength;
Length -= TempLength;
ReadOffset += TempLength;