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

Function Ext2UnlinkMcb

Ext4Fsd/memory.c:2937–2955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2935/* Unlink Mcb from Vcb->McbList queue */
2936
2937VOID
2938Ext2UnlinkMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
2939{
2940 if (Mcb->Inode.i_ino == EXT2_ROOT_INO) {
2941 return;
2942 }
2943
2944 ExAcquireResourceExclusiveLite(&Vcb->McbLock, TRUE);
2945
2946 if (IsFlagOn(Mcb->Flags, MCB_VCB_LINK)) {
2947 RemoveEntryList(&(Mcb->Link));
2948 ClearLongFlag(Mcb->Flags, MCB_VCB_LINK);
2949 Ext2DerefXcb(&Vcb->NumOfMcb);
2950 } else {
2951 DEBUG(DL_RES, ( "Ext2UnlinkMcb: %wZ already unlinked.\n",
2952 &Mcb->FullName));
2953 }
2954 ExReleaseResourceLite(&Vcb->McbLock);
2955}
2956
2957/* get the first Mcb record in Vcb->McbList */
2958

Callers 2

Ext2UnlinkFcbFunction · 0.85
Ext2FreeCcbFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected