sys: write.c, file.c: better handle failure cases around cache resizing

This commit is contained in:
Bill Zissimopoulos
2016-03-11 22:57:51 -08:00
parent 1fa9dcaa61
commit 920c15e022
3 changed files with 8 additions and 3 deletions

View File

@ -231,7 +231,9 @@ static NTSTATUS FspFsvolWriteCached(
return STATUS_SUCCESS;
cleanup:
CcGetFileSizePointer(FileObject)->QuadPart = OriginalFileSize;
/* pull back the cache file size if we extended it */
if (ExtendingFile)
CcGetFileSizePointer(FileObject)->QuadPart = OriginalFileSize;
FspFileNodeRelease(FileNode, Main);