MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2FastIoUnlockAll

Function Ext2FastIoUnlockAll

Ext4Fsd/fastio.c:703–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701}
702
703BOOLEAN
704Ext2FastIoUnlockAll (
705 IN PFILE_OBJECT FileObject,
706 IN PEPROCESS Process,
707 OUT PIO_STATUS_BLOCK IoStatus,
708 IN PDEVICE_OBJECT DeviceObject)
709{
710 BOOLEAN Status = FALSE;
711 PEXT2_FCB Fcb;
712
713 __try {
714
715 FsRtlEnterFileSystem();
716
717 __try {
718
719 if (IsExt2FsDevice(DeviceObject)) {
720 IoStatus->Status = STATUS_INVALID_DEVICE_REQUEST;
721 __leave;
722 }
723
724 Fcb = (PEXT2_FCB) FileObject->FsContext;
725 if (Fcb == NULL || Fcb->Identifier.Type == EXT2VCB) {
726 DbgBreak();
727 IoStatus->Status = STATUS_INVALID_PARAMETER;
728 __leave;
729 }
730
731 ASSERT((Fcb->Identifier.Type == EXT2FCB) &&
732 (Fcb->Identifier.Size == sizeof(EXT2_FCB)));
733
734 if (IsDirectory(Fcb)) {
735 DbgBreak();
736 IoStatus->Status = STATUS_INVALID_PARAMETER;
737 __leave;
738 }
739#if EXT2_DEBUG
740 DEBUG(DL_INF, (
741 "Ext2FastIoUnlockSingle: %s %s %wZ\n",
742 (PUCHAR) Process + ProcessNameOffset,
743 "FASTIO_UNLOCK_ALL",
744 &Fcb->Mcb->FullName
745 ));
746#endif
747
748 if (!FsRtlOplockIsFastIoPossible(&Fcb->Oplock)) {
749 __leave;
750 }
751
752 IoStatus->Status = FsRtlFastUnlockAll(
753 &Fcb->FileLockAnchor,
754 FileObject,
755 Process,
756 NULL );
757
758 IoStatus->Information = 0;
759 Status = TRUE;
760

Callers

nothing calls this directly

Calls 2

Ext2IsFastIoPossibleFunction · 0.85
Ext2NtStatusToStringFunction · 0.85

Tested by

no test coverage detected