| 55 | */ |
| 56 | |
| 57 | VOID |
| 58 | DriverUnload (IN PDRIVER_OBJECT DriverObject) |
| 59 | { |
| 60 | |
| 61 | UNICODE_STRING DosDeviceName; |
| 62 | |
| 63 | DEBUG(DL_FUN, ( "Ext2Fsd: Unloading routine.\n")); |
| 64 | |
| 65 | /* |
| 66 | * stop reaper thread ... |
| 67 | */ |
| 68 | |
| 69 | |
| 70 | /* |
| 71 | * removing memory allocations and objects |
| 72 | */ |
| 73 | |
| 74 | RtlInitUnicodeString(&DosDeviceName, DOS_DEVICE_NAME); |
| 75 | IoDeleteSymbolicLink(&DosDeviceName); |
| 76 | |
| 77 | Ext2UnloadAllNls(); |
| 78 | |
| 79 | ExDeleteResourceLite(&Ext2Global->Resource); |
| 80 | |
| 81 | ExDeleteNPagedLookasideList(&(Ext2Global->Ext2DentryLookasideList)); |
| 82 | ExDeleteNPagedLookasideList(&(Ext2Global->Ext2ExtLookasideList)); |
| 83 | ExDeleteNPagedLookasideList(&(Ext2Global->Ext2McbLookasideList)); |
| 84 | ExDeleteNPagedLookasideList(&(Ext2Global->Ext2CcbLookasideList)); |
| 85 | ExDeleteNPagedLookasideList(&(Ext2Global->Ext2FcbLookasideList)); |
| 86 | ExDeleteNPagedLookasideList(&(Ext2Global->Ext2IrpContextLookasideList)); |
| 87 | |
| 88 | ObDereferenceObject(Ext2Global->DiskdevObject); |
| 89 | ObDereferenceObject(Ext2Global->CdromdevObject); |
| 90 | |
| 91 | /* cleanup journal related caches */ |
| 92 | UNLOAD_MODULE(journal_exit); |
| 93 | |
| 94 | /* cleanup linux lib */ |
| 95 | ext2_destroy_linux(); |
| 96 | |
| 97 | Ext2FreePool(Ext2Global, 'LG2E'); |
| 98 | Ext2Global = NULL; |
| 99 | } |
| 100 | |
| 101 | #endif |
| 102 |
nothing calls this directly
no test coverage detected