X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fvfs%2Fdir.c;h=add48b0cfadd84ea25dacc058a84f8317ee3092b;hb=8394ad407646ea68f17c29e9899936e0906c4725;hp=cd45121307728c0565248cf5b2b3b9ab4e9654d0;hpb=d0b4559f2936f6d9f06be0f7c3c51527a480ec0d;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/vfs/dir.c b/KernelLand/Kernel/vfs/dir.c index cd451213..add48b0c 100644 --- a/KernelLand/Kernel/vfs/dir.c +++ b/KernelLand/Kernel/vfs/dir.c @@ -104,9 +104,11 @@ int VFS_MkNod(const char *Path, Uint Flags) return ret==NULL; _error: - _CloseNode(parent); - ASSERT(mountpt->OpenHandleCount>0); - mountpt->OpenHandleCount --; + if( parent ) { + _CloseNode(parent); + ASSERT(mountpt->OpenHandleCount>0); + mountpt->OpenHandleCount --; + } free(absPath); LEAVE('i', -1); return -1; @@ -178,10 +180,12 @@ int VFS_ReadDir(int FD, char *Dest) return 0; } + #if 0 if(h->Node->Size != (Uint64)-1 && h->Position >= h->Node->Size) { //LEAVE('i', 0); return 0; } + #endif do { rv = h->Node->Type->ReadDir(h->Node, h->Position, Dest);