diff options
author | Matt Wu <matt@ext2fsd.com> | 2016-03-13 15:47:57 +0300 |
---|---|---|
committer | Matt Wu <matt@ext2fsd.com> | 2016-03-13 15:47:57 +0300 |
commit | cb7d54c1165f7af04fdafcc61992cd7e7afc3a7e (patch) | |
tree | 58edf98e7edf207e7dd63044788ab12b2e8cf37f | |
parent | b99763242c4598aa94c5155ee1c63da644e50ec0 (diff) |
FIXME: code refined for beyond-VDL-data cleaning
-rwxr-xr-x | Ext3Fsd/write.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/Ext3Fsd/write.c b/Ext3Fsd/write.c index ee0a000..721b911 100755 --- a/Ext3Fsd/write.c +++ b/Ext3Fsd/write.c @@ -1152,19 +1152,17 @@ Ext2WriteFile(IN PEXT2_IRP_CONTEXT IrpContext) } else { if (!PagingIo && !RecursiveWriteThrough && !IsLazyWriter(Fcb)) { - if (ByteOffset.QuadPart + Length > Fcb->Header.ValidDataLength.QuadPart ) { - if (ByteOffset.QuadPart > Fcb->Header.ValidDataLength.QuadPart) { - - /* let this irp wait, since it has to be synchronous */ - SetFlag(IrpContext->Flags, IRP_CONTEXT_FLAG_WAIT); - rc = Ext2ZeroData(IrpContext, Vcb, FileObject, - &Fcb->Header.ValidDataLength, - &ByteOffset); - if (!rc) { - Status = STATUS_PENDING; - DbgBreak(); - __leave; - } + if (ByteOffset.QuadPart > Fcb->Header.ValidDataLength.QuadPart) { + + /* let this irp wait, since it has to be synchronous */ + SetFlag(IrpContext->Flags, IRP_CONTEXT_FLAG_WAIT); + rc = Ext2ZeroData(IrpContext, Vcb, FileObject, + &Fcb->Header.ValidDataLength, + &ByteOffset); + if (!rc) { + Status = STATUS_PENDING; + DbgBreak(); + __leave; } } } |