Added CcMdlReadComplete2

This commit is contained in:
Dibyamartanda Samanta 2024-05-09 12:23:16 +02:00
parent 5d61f70a7d
commit d63d9efb39

41
CC/ccmdlhandler.cpp Normal file
View File

@ -0,0 +1,41 @@
/*
* PROJECT: Alcyone Kernel
* LICENSE: BSD Clause 3
* PURPOSE: Cache Controller:: MDL Handler
* NT KERNEL: 5.11.9360
* COPYRIGHT: 2023-2029 Dibymartanda Samanta <>
*
*/
#include <ntoskrnl.h>
#define NTDEBUG
#include <debug.h>
#include "ccinternal.hpp"
#include "ccmdl.hpp"
/* Intenal Functions */
VOID
NTAPI
CcMdlReadComplete2 (
IN PFILE_OBJECT FileObject,
IN PMDL MdlChain
)
{
/* Check if MDL Chain is Valid */
if (MdlChain)
{
/*Iterate Through the MDL CHain*/
for( auto it = begin(MdlChain); it != end(MdlChain);++it)
{
/*Unlock the memory pages associated with the MDL*/
MmUnlockPages(*it);
/*Free The MDL */
IoFreeMdl(*it);
}
}
}