void Ext2_CloseFile(tVFS_Node *Node)\r
{\r
tExt2_Disk *disk = Node->ImplPtr;\r
+ ENTER("pNode", Node);\r
\r
if( Mutex_Acquire(&Node->Lock) != 0 )\r
{\r
+ LEAVE('-');\r
return ;\r
}\r
\r
if( Node->Flags & VFS_FFLAG_DIRTY )\r
{\r
// Commit changes\r
+ Log_Warning("Ext2", "TODO: Commit node changes");\r
}\r
\r
int was_not_referenced = (Node->ImplInt == 0);\r
tVFS_ACL *acls = Node->ACLs;\r
- if( Inode_UncacheNode(disk->CacheID, Node->Inode) )\r
+ if( Inode_UncacheNode(disk->CacheID, Node->Inode) == 1 )\r
{\r
if( was_not_referenced )\r
{\r
+ LOG("Removng inode");\r
// Remove inode\r
+ Log_Warning("Ext2", "TODO: Remove inode when not deleted");\r
}\r
if( acls != &gVFS_ACL_EveryoneRW ) {\r
free(acls);\r
}\r
+ LOG("Node cleaned");\r
}\r
+ else {\r
+ LOG("Still referenced, releasing lock");\r
+ Mutex_Release(&Node->Lock);\r
+ }\r
+ LEAVE('-');\r
return ;\r
}\r
\r