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

Function DriverUnload

Ext4Fsd/init.c:57–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 */
56
57VOID
58DriverUnload (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

Callers

nothing calls this directly

Calls 3

Ext2UnloadAllNlsFunction · 0.85
ext2_destroy_linuxFunction · 0.85
Ext2FreePoolFunction · 0.85

Tested by

no test coverage detected