MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / CleanNode

Method CleanNode

Kernel/src/fs/ext2.cpp:1474–1486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1472 }
1473
1474 void Ext2Volume::CleanNode(Ext2Node* node){
1475 if(node->handleCount > 0){
1476 Log::Warning("[Ext2] CleanNode: Node (inode %d) is referenced by %d handles", node->inode, node->handleCount);
1477 return;
1478 }
1479
1480 if(node->e2inode.linkCount == 0){ // No links to file
1481 EraseInode(node->e2inode, node->inode);
1482 }
1483
1484 inodeCache.remove(node->inode);
1485 delete node;
1486 }
1487
1488 Ext2Node::Ext2Node(Ext2Volume* vol, ext2_inode_t& ino, ino_t inode){
1489 this->vol = vol;

Callers 1

CloseMethod · 0.80

Calls 2

WarningFunction · 0.85
removeMethod · 0.45

Tested by

no test coverage detected