Kernel - Implimented VFS_Reopen
[tpg/acess2.git] / KernelLand / Kernel / include / vfs_int.h
index 06ad8da..c2dacd3 100644 (file)
@@ -73,6 +73,18 @@ static inline void _CloseNode(tVFS_Node *Node)
        if(Node && Node->Type && Node->Type->Close)
                Node->Type->Close( Node );
 }
+static inline void _ReferenceNode(tVFS_Node *Node)
+{
+       if( !MM_GetPhysAddr(Node->Type) ) {
+               Log_Error("VFS", "Node %p's type is invalid (%p bad pointer) - %P corrupted",
+                       Node, Node->Type, MM_GetPhysAddr(&Node->Type));
+               return ;
+       }
+       if( Node->Type && Node->Type->Reference )
+               Node->Type->Reference( Node );
+       else
+               Node->ReferenceCount ++;
+}
 
 
 #endif

UCC git Repository :: git.ucc.asn.au