It is not necessary, the unmapping will happen automatically when the
MDL is torn down.
Neal Christiansen
Microsoft File System Filter Group Lead
This posting is provided “AS IS” with no warranties, and confers no
Rights
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Peter Scott
Sent: Thursday, March 31, 2005 1:06 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] IoFreeIrp
Neal,
Per my reply to Ken, shouldn’t you also check to see if they are mapped?
And
un-map accordingly?
Pete
Kernel Drivers
Windows Filesystem and Device Driver Consulting
www.KernelDrivers.com
(303)546-0300
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Neal Christiansen
Sent: Thursday, March 31, 2005 1:58 PM
To: Windows File Systems Devs Interest List
Subject: RE: [ntfsd] IoFreeIrp
You should have a loop that looks like this:
VOID
MyFreeMdl(
PMDL Mdl
)
{
PMDL currentMdl, nextMdl;
for (currentMdl = Mdl; currentMdl != NULL; currentMdl = nextMdl) {
nextMdl = currentMdl->Next;
if (FlagOn( currentMdl->MdlFlags, MDL_PAGES_LOCKED )) {
MmUnlockPages( currentMdl );
}
IoFreeMdl( currentMdl );
}
}
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Ken Galipeau
Sent: Thursday, March 31, 2005 9:15 AM
To: Windows File Systems Devs Interest List
Subject: [ntfsd] IoFreeIrp
I have found that IoFreeIrp does not free an MDL that has been set in
the Irp. I issue an MJ_READ and some driver below sets the MDL.
Calling IoFreeMdl frees the mdl. Is there anything else I need to to to
clean up the MDL aside from calling IoFreeMdl (like unlock pages, etc.)?
Thanks,
Ken
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the IFS FAQ at
https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com