From 45f26cb114c0a7302f51f29ddcac3f5c070fa6e9 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Wed, 6 Dec 2006 13:29:21 +0000 Subject: [PATCH] - 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. svn path=/trunk/; revision=25073 --- reactos/drivers/filesystems/vfat/rw.c | 2 +- reactos/ntoskrnl/cc/copy.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/filesystems/vfat/rw.c b/reactos/drivers/filesystems/vfat/rw.c index c40a76767ad..54b2d2bbb96 100644 --- a/reactos/drivers/filesystems/vfat/rw.c +++ b/reactos/drivers/filesystems/vfat/rw.c @@ -689,7 +689,7 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext) (BOOLEAN)(IrpContext->Flags & IRPCONTEXT_CANWAIT), Buffer, &IrpContext->Irp->IoStatus)) { - Status = STATUS_PENDING; + Status = IrpContext->Irp->IoStatus.Status;//STATUS_PENDING; goto ByeBye; } CHECKPOINT; diff --git a/reactos/ntoskrnl/cc/copy.c b/reactos/ntoskrnl/cc/copy.c index 9da3b2a8f4d..5d73d7d037a 100644 --- a/reactos/ntoskrnl/cc/copy.c +++ b/reactos/ntoskrnl/cc/copy.c @@ -382,6 +382,15 @@ CcCopyRead (IN PFILE_OBJECT FileObject, { 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; -- 2.17.1