| 792 | } |
| 793 | |
| 794 | BOOLEAN |
| 795 | Ext2FastIoUnlockAllByKey ( |
| 796 | IN PFILE_OBJECT FileObject, |
| 797 | IN PEPROCESS Process, |
| 798 | IN ULONG Key, |
| 799 | OUT PIO_STATUS_BLOCK IoStatus, |
| 800 | IN PDEVICE_OBJECT DeviceObject |
| 801 | ) |
| 802 | { |
| 803 | BOOLEAN Status = FALSE; |
| 804 | PEXT2_FCB Fcb; |
| 805 | |
| 806 | __try { |
| 807 | |
| 808 | FsRtlEnterFileSystem(); |
| 809 | |
| 810 | __try { |
| 811 | |
| 812 | if (IsExt2FsDevice(DeviceObject)) { |
| 813 | IoStatus->Status = STATUS_INVALID_DEVICE_REQUEST; |
| 814 | __leave; |
| 815 | } |
| 816 | |
| 817 | Fcb = (PEXT2_FCB) FileObject->FsContext; |
| 818 | if (Fcb == NULL || Fcb->Identifier.Type == EXT2VCB) { |
| 819 | DbgBreak(); |
| 820 | IoStatus->Status = STATUS_INVALID_PARAMETER; |
| 821 | __leave; |
| 822 | } |
| 823 | |
| 824 | ASSERT((Fcb->Identifier.Type == EXT2FCB) && |
| 825 | (Fcb->Identifier.Size == sizeof(EXT2_FCB))); |
| 826 | |
| 827 | if (IsDirectory(Fcb)) { |
| 828 | DbgBreak(); |
| 829 | IoStatus->Status = STATUS_INVALID_PARAMETER; |
| 830 | __leave; |
| 831 | } |
| 832 | |
| 833 | #if EXT2_DEBUG |
| 834 | DEBUG(DL_INF, ( |
| 835 | "Ext2FastIoUnlockAllByKey: %s %s %wZ\n", |
| 836 | (PUCHAR) Process + ProcessNameOffset, |
| 837 | "FASTIO_UNLOCK_ALL_BY_KEY", |
| 838 | &Fcb->Mcb->FullName |
| 839 | )); |
| 840 | |
| 841 | DEBUG(DL_INF, ( |
| 842 | "Ext2FastIoUnlockAllByKey: Key: %u\n", |
| 843 | Key |
| 844 | )); |
| 845 | #endif |
| 846 | |
| 847 | if (!FsRtlOplockIsFastIoPossible(&Fcb->Oplock)) { |
| 848 | __leave; |
| 849 | } |
| 850 | |
| 851 | IoStatus->Status = FsRtlFastUnlockAllByKey( |
nothing calls this directly
no test coverage detected