mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- Fixed the releasing of cache segments on error in ReadCacheSegment/CcCopyWrite/CcCopyRead.
svn path=/trunk/; revision=4760
This commit is contained in:
parent
10acad2b71
commit
ab5ce5a163
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: copy.c,v 1.15 2003/02/18 22:06:53 chorns Exp $
|
||||
/* $Id: copy.c,v 1.16 2003/05/25 21:50:18 hbirr Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -196,7 +196,6 @@ ReadCacheSegment(PCACHE_SEGMENT CacheSeg)
|
|||
|
||||
if (!NT_SUCCESS(Status) && Status != STATUS_END_OF_FILE)
|
||||
{
|
||||
CcRosReleaseCacheSegment(CacheSeg->Bcb, CacheSeg, FALSE, FALSE, FALSE);
|
||||
DPRINT1("IoPageRead failed, Status %x\n", Status);
|
||||
return Status;
|
||||
}
|
||||
|
@ -322,6 +321,7 @@ CcCopyRead (IN PFILE_OBJECT FileObject,
|
|||
{
|
||||
IoStatus->Information = 0;
|
||||
IoStatus->Status = Status;
|
||||
CcRosReleaseCacheSegment(Bcb, CacheSeg, FALSE, FALSE, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -440,6 +440,7 @@ CcCopyWrite (IN PFILE_OBJECT FileObject,
|
|||
{
|
||||
if (!NT_SUCCESS(ReadCacheSegment(CacheSeg)))
|
||||
{
|
||||
CcRosReleaseCacheSegment(Bcb, CacheSeg, FALSE, FALSE, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue