mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 22:16:04 +00:00
[BTRFS] Upgrade to BtrFS 1.0.1
CID 1419459, 1419378 CORE-13896
This commit is contained in:
parent
194df1ba58
commit
4672b2ba5e
15 changed files with 329 additions and 152 deletions
|
@ -3209,17 +3209,6 @@ NTSTATUS do_read(PIRP Irp, BOOLEAN wait, ULONG* bytes_read) {
|
|||
return STATUS_PENDING;
|
||||
}
|
||||
|
||||
if (!(Irp->Flags & IRP_PAGING_IO) && FileObject->SectionObjectPointer->DataSectionObject) {
|
||||
IO_STATUS_BLOCK iosb;
|
||||
|
||||
CcFlushCache(FileObject->SectionObjectPointer, &IrpSp->Parameters.Read.ByteOffset, length, &iosb);
|
||||
|
||||
if (!NT_SUCCESS(iosb.Status)) {
|
||||
ERR("CcFlushCache returned %08x\n", iosb.Status);
|
||||
return iosb.Status;
|
||||
}
|
||||
}
|
||||
|
||||
if (fcb->ads)
|
||||
Status = read_stream(fcb, data, start, length, bytes_read);
|
||||
else
|
||||
|
@ -3325,6 +3314,16 @@ NTSTATUS drv_read(PDEVICE_OBJECT DeviceObject, PIRP Irp) {
|
|||
if (Irp->Flags & IRP_PAGING_IO)
|
||||
wait = TRUE;
|
||||
|
||||
if (!(Irp->Flags & IRP_PAGING_IO) && FileObject->SectionObjectPointer->DataSectionObject) {
|
||||
IO_STATUS_BLOCK iosb;
|
||||
|
||||
CcFlushCache(FileObject->SectionObjectPointer, &IrpSp->Parameters.Read.ByteOffset, IrpSp->Parameters.Read.Length, &iosb);
|
||||
if (!NT_SUCCESS(iosb.Status)) {
|
||||
ERR("CcFlushCache returned %08x\n", iosb.Status);
|
||||
return iosb.Status;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ExIsResourceAcquiredSharedLite(fcb->Header.Resource)) {
|
||||
if (!ExAcquireResourceSharedLite(fcb->Header.Resource, wait)) {
|
||||
Status = STATUS_PENDING;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue